Skip to content
Snippets Groups Projects
Commit 84fa849a authored by dgelessus's avatar dgelessus
Browse files

Remove unneeded parameterization of OperationsTest

parent 2d8f510a
No related branches found
No related tags found
No related merge requests found
package de.tla2b.prettyprintb;
import java.io.File;
import java.util.List;
import de.be4.classicalb.core.parser.BParser;
import de.be4.classicalb.core.parser.node.Start;
import de.be4.classicalb.core.parser.util.PrettyPrinter;
import de.tla2b.util.FileUtils;
import de.tla2b.util.TestUtil;
import de.tla2bAst.Translator;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class OperationsTest {
private final File moduleFile;
public OperationsTest(File machine) {
this.moduleFile = machine;
}
@Test
public void testRunTLC() throws Exception {
// String[] a = new String[] { moduleFile.getPath() };
// runModule(moduleFile.getPath());
Translator t = new Translator(moduleFile.getPath());
Translator t = new Translator("src/test/resources/prettyprint/OperationsTest/OperationsTest.tla");
Start start = t.translate();
String resultTree = TestUtil.getTreeAsString(start);
......@@ -46,9 +35,7 @@ public class OperationsTest {
// machine file
String machinePath = FileUtils.removeExtention(moduleFile.getPath())
+ ".mch";
File expectedMachine = new File(machinePath);
File expectedMachine = new File("src/test/resources/prettyprint/OperationsTest/OperationsTest.mch");
final BParser expectedParser = new BParser("testcase");
final Start expectedStart = expectedParser.parseFile(expectedMachine,
......@@ -58,9 +45,4 @@ public class OperationsTest {
assertEquals(expectedTree, resultTree);
}
@Parameterized.Parameters(name = "{0}")
public static List<File> getConfig() {
return TestUtil.getModulesRecursively("./src/test/resources/prettyprint/OperationsTest/");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment