Skip to content
Snippets Groups Projects
Commit 9796cb6e authored by Jan Gruteser's avatar Jan Gruteser
Browse files

test nested boolean

parent f9cf4ade
No related branches found
No related tags found
Loading
Pipeline #149312 passed
...@@ -35,6 +35,18 @@ public class BBuiltInsTest { ...@@ -35,6 +35,18 @@ public class BBuiltInsTest {
assertEquals("POW(BOOL)", t.getConstantType("k")); assertEquals("POW(BOOL)", t.getConstantType("k"));
} }
@Test
public void testNestedBooleanDefinitions() throws Exception {
String module = "---- MODULE Testing ----\n"
+ "EXTENDS Naturals \n"
+ "InnerDef(b) == b>5 \n"
+ "HelpDef(a,b) == a<7 /\\ InnerDef(b) \n"
+ "Init == TRUE = HelpDef(3,4) \n"
+ "===============";
TestTypeChecker t = TestUtil.typeCheckString(module);
assertEquals("BOOL", t.getDefinitionType("HelpDef"));
assertEquals("BOOL", t.getDefinitionType("InnerDef"));
}
/* /*
* String * String
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment