예제 #1
0
 private void processAndCompare(final String testName) throws Exception {
   final File actualFile = process(testName);
   String expectedFileName;
   if (testName.startsWith("/")) {
     expectedFileName = PathHelper.replaceExtension(testName, ".expected.idt.h");
   } else {
     expectedFileName = PathHelper.fullyQualifiedNameToPath(testName, ".expected.itf.h");
   }
   final URL expected =
       getClass()
           .getClassLoader()
           .getResource(expectedFileName.substring(1, expectedFileName.length()));
   assertNotNull("Unable to find expected result " + expectedFileName, expected);
   final File expectedFile = new File(expected.toURI());
   compare(actualFile, expectedFile);
 }
예제 #2
0
 private File process(final String testName) throws ADLException {
   final IDL idl = loader.load(testName, context);
   idlVisitor.visit(idl, context);
   if (testName.startsWith("/")) {
     return new File("target/build" + testName + ".h");
   } else {
     return new File("target/build" + PathHelper.fullyQualifiedNameToPath(idl.getName(), "itf.h"));
   }
 }