Skip to content

Commit 5faf9c6

Browse files
committed
Add a new test case for very large json files
1 parent 5fe4ba4 commit 5faf9c6

File tree

3 files changed

+53233
-0
lines changed

3 files changed

+53233
-0
lines changed

src/tests/java/Tests.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@
99

1010
public class Tests {
1111

12+
@Test
13+
public void testVeryLargeFile() {
14+
15+
Path expectedPath = Path.of("src", "tests", "java", "data", "test6", "expected6.out");
16+
Path testPath = Path.of("src", "tests", "java", "data", "test6", "test6.json");
17+
18+
long startTime = System.nanoTime();
19+
20+
String expected = String.join("\n", FileOperations.readFile(expectedPath));
21+
String actual = JSONProcessor.processJson(testPath).toString();
22+
23+
long endTime = System.nanoTime();
24+
long duration = (endTime - startTime) / 1000000; // in miliseconds
25+
26+
assertEquals(expected, actual);
27+
}
28+
1229
@Test
1330
public void testNumbers() {
1431

0 commit comments

Comments
 (0)