add test profiles with lookups.dat
This commit is contained in:
parent
eba0b18689
commit
fb7c73bb0f
2 changed files with 35 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
package btools.expressions;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class IntegrityCheckProfileTest {
|
||||
|
||||
@Test
|
||||
public void integrityTestProfiles() throws IOException {
|
||||
File workingDir = new File(".").getCanonicalFile();
|
||||
File profileDir = new File(workingDir, "../misc/profiles2");
|
||||
File[] files = profileDir.listFiles();
|
||||
|
||||
assertNotNull("Missing profiles", files);
|
||||
|
||||
for (File f : files) {
|
||||
if (f.getName().endsWith(".brf")) {
|
||||
BExpressionMetaData meta = new BExpressionMetaData();
|
||||
BExpressionContext expctxWay = new BExpressionContextWay( meta );
|
||||
BExpressionContext expctxNode = new BExpressionContextNode( meta );
|
||||
meta.readMetaData( new File( profileDir, "lookups.dat") );
|
||||
expctxNode.setForeignContext(expctxWay);
|
||||
expctxWay.parseFile( f, "global" );
|
||||
expctxNode.parseFile( f, "global" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -20,3 +20,4 @@ assign costfactor
|
|||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
assign initialcost = 0
|
||||
|
|
Loading…
Reference in a new issue