MCPcopy Create free account
hub / github.com/apecloud/myduckserver / readTestsFromFile

Method readTestsFromFile

compatibility/pg/java/PGTest.java:44–61  ·  view source on GitHub ↗
(String filename)

Source from the content-addressed store, hash-verified

42 }
43
44 public void readTestsFromFile(String filename) {
45 try (BufferedReader br = new BufferedReader(new FileReader(filename))) {
46 String line;
47 while ((line = br.readLine()) != null) {
48 if (line.trim().isEmpty()) continue;
49 String query = line;
50 List<String[]> results = new LinkedList<>();
51 while ((line = br.readLine()) != null && !line.trim().isEmpty()) {
52 results.add(line.split(","));
53 }
54 String[][] expectedResults = results.toArray(new String[0][]);
55 addTest(query, expectedResults);
56 }
57 } catch (IOException e) {
58 e.printStackTrace();
59 System.exit(1);
60 }
61 }
62
63 public class Test {
64 private String query;

Callers 1

mainMethod · 0.95

Calls 1

addTestMethod · 0.95

Tested by

no test coverage detected