Skip to content

Commit

Permalink
change nextReal back to next in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer committed Jan 30, 2023
1 parent d019cfb commit 0564780
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions test/__snapshots__/mersenne.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Vitest Snapshot v1

exports[`mersenne twister > seed: [42,1,2] > should return deterministic value for nextReal() 1`] = `0.8562037434894592`;
exports[`mersenne twister > seed: [42,1,2] > should return deterministic value for next() 1`] = `0.8562037434894592`;

exports[`mersenne twister > seed: [1211,1,2] > should return deterministic value for nextReal() 1`] = `0.8916433283593506`;
exports[`mersenne twister > seed: [1211,1,2] > should return deterministic value for next() 1`] = `0.8916433283593506`;

exports[`mersenne twister > seed: [1337,1,2] > should return deterministic value for nextReal() 1`] = `0.17990487208589911`;
exports[`mersenne twister > seed: [1337,1,2] > should return deterministic value for next() 1`] = `0.17990487208589911`;

exports[`mersenne twister > seed: 42 > should return deterministic value for nextReal() 1`] = `0.37454011430963874`;
exports[`mersenne twister > seed: 42 > should return deterministic value for next() 1`] = `0.37454011430963874`;

exports[`mersenne twister > seed: 1211 > should return deterministic value for nextReal() 1`] = `0.9285201537422836`;
exports[`mersenne twister > seed: 1211 > should return deterministic value for next() 1`] = `0.9285201537422836`;

exports[`mersenne twister > seed: 1337 > should return deterministic value for nextReal() 1`] = `0.2620246761944145`;
exports[`mersenne twister > seed: 1337 > should return deterministic value for next() 1`] = `0.2620246761944145`;
6 changes: 3 additions & 3 deletions test/mersenne.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ describe('mersenne twister', () => {
mersenne.seed(seed);
});

it(`should return deterministic value for nextReal()`, () => {
const actual = mersenne.nextReal();
it(`should return deterministic value for next()`, () => {
const actual = mersenne.next();

expect(actual).toMatchSnapshot();
});
Expand All @@ -44,7 +44,7 @@ describe('mersenne twister', () => {
for (let i = 1; i <= NON_SEEDED_BASED_RUN; i++) {
describe('next', () => {
it('should return random number from interval [0, 1)', () => {
const actual = mersenne.nextReal();
const actual = mersenne.next();

expect(actual).toBeGreaterThanOrEqual(0);
expect(actual).toBeLessThan(1);
Expand Down

0 comments on commit 0564780

Please sign in to comment.