Skip to content

Commit

Permalink
test: increase number of test repetitions to 1000; remove edge entrop…
Browse files Browse the repository at this point in the history
…y test
  • Loading branch information
iluxonchik committed Jan 11, 2024
1 parent 4fa648a commit fc0c86e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 57 deletions.
11 changes: 1 addition & 10 deletions contracts/src/tests/RandomGeoPointGenerator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import pointInPolygon from 'point-in-polygon';
import RandomGeoPointGenerator from './utils/RandomGeoPointGenerator';

describe('RandomGeoPointGenerator Class Tests', () => {
const numberOfIterations = 10; // configurable number of iterations for each test
const numberOfIterations = 1000; // configurable number of iterations for each test

const randomGeoPointInside: RandomGeoPointGenerator = new RandomGeoPointGenerator();
const randomGeoPointOutside: RandomGeoPointGenerator = new RandomGeoPointGenerator();
Expand Down Expand Up @@ -120,13 +120,4 @@ describe('RandomGeoPointGenerator Unique Triangle Tests', () => {
expect(() => generator.generateTriangleWithPointOutside(point)).not.toThrow('Duplicate triangle generated for type outside');
}
});

it('should not generate the same triangle twice for the same point (on edge)', () => {
const generator = new RandomGeoPointGenerator();
const point = RandomGeoPointGenerator.generateRandomZKGeoPoint();

for (let i = 0; i < numCalls; i++) {
expect(() => generator.generateTriangleWithPointOnEdge(point)).not.toThrow('Duplicate triangle generated for type edge');
}
});
});
47 changes: 0 additions & 47 deletions contracts/src/tests/api/IntegrationOracle.test.ts

This file was deleted.

0 comments on commit fc0c86e

Please sign in to comment.