MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / testdataFiles

Method testdataFiles

src/test/java/com/amazon/ion/TestUtils.java:161–193  ·  view source on GitHub ↗
(FilenameFilter filter,
                                      File dir,
                                      List<File> results,
                                      boolean recurse)

Source from the content-addressed store, hash-verified

159
160
161 private static void testdataFiles(FilenameFilter filter,
162 File dir,
163 List<File> results,
164 boolean recurse)
165 {
166 String[] fileNames = dir.list();
167 if (fileNames == null)
168 {
169 String message = "Not a directory: " + dir.getAbsolutePath();
170 throw new IllegalArgumentException(message);
171 }
172
173 // Sort the fileNames so they are listed in order.
174 // This is not a functional requirement but it helps humans scanning
175 // the output looking for a specific file.
176 Arrays.sort(fileNames);
177
178 for (String fileName : fileNames)
179 {
180 File testFile = new File(dir, fileName);
181 if (testFile.isDirectory())
182 {
183 if (recurse)
184 {
185 testdataFiles(filter, testFile, results, recurse);
186 }
187 }
188 else if (filter == null || filter.accept(dir, fileName))
189 {
190 results.add(testFile);
191 }
192 }
193 }
194
195 public static File[] testdataFiles(FilenameFilter filter,
196 boolean recurse,

Callers 15

NonEquivsTestClass · 0.95
EquivsTestClass · 0.95
TimestampGoodTestClass · 0.80
EquivTimelineTestClass · 0.80
GoodIonTestClass · 0.80
BadIonTestClass · 0.80
RoundTripTestClass · 0.80
TimestampBadTestClass · 0.80
ReaderSkippingTestClass · 0.80
BadIonStreamingTestClass · 0.80
ReaderDomCopyTestClass · 0.80

Calls 5

getTestdataFileMethod · 0.95
acceptMethod · 0.65
addMethod · 0.65
toArrayMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected