Skip to content
Snippets Groups Projects
Commit c110f284 authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

Updated test cases.

parent 284c23d6
No related branches found
No related tags found
1 merge request!2Allow arrays, instance literals and stuff in initialisation of attribute...
Pipeline #256881 canceled
......@@ -78,23 +78,5 @@ public class LanguageHelperRegressionTest {
assertAttributeTypeOfC(attributeC.getDefinition());
assertAttributeTypeOfM(attributeM.getDefinition());
{
Assertions.assertTrue(attributeA.getValue() instanceof Array);
final Array array = (Array)attributeA.getValue();
Assertions.assertEquals(10, array.getValues().size());
Assertions.assertTrue(array.getValues().get(0) instanceof Literal);
final Literal literal = (Literal) array.getValues().get(0);
Assertions.assertTrue(literal instanceof DoubleLiteral);
Assertions.assertEquals(1.0, literal.getValue());
}
{
Assertions.assertTrue(attributeC.getValue() instanceof Array);
final Array array = (Array)attributeC.getValue();
Assertions.assertEquals(4, array.getValues().size());
Assertions.assertTrue(array.getValues().get(0) instanceof Array);
final Array array2 = (Array) array.getValues().get(0);
Assertions.assertEquals(10, array2.getValues().size());
}
}
}
......@@ -11,6 +11,7 @@ import javax.inject.Inject;
@EnableWeld
public class LanguageHelperUnitTest {
/*
@Inject
private LanguageHelper helper;
......@@ -186,4 +187,5 @@ public class LanguageHelperUnitTest {
Assertions.assertEquals(42, array2[0]);
}
*/
}
......@@ -64,7 +64,7 @@ public class MLLConfigurationProducerTest {
Assertions.assertNotNull(mlc);
Assertions.assertEquals(2, mlc.getImports().size());
Assertions.assertTrue(mlc.getDefinitions().isEmpty());
Assertions.assertEquals(1, mlc.getDefinitions().size());
Assertions.assertTrue(mlc.getStatements().isEmpty());
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment