Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tla2bAST
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tla2bAST
Commits
9796cb6e
Commit
9796cb6e
authored
4 months ago
by
Jan Gruteser
Browse files
Options
Downloads
Patches
Plain Diff
test nested boolean
parent
f9cf4ade
No related branches found
No related tags found
Loading
Pipeline
#149312
passed
4 months ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/tla2b/typechecking/BBuiltInsTest.java
+12
-0
12 additions, 0 deletions
src/test/java/de/tla2b/typechecking/BBuiltInsTest.java
with
12 additions
and
0 deletions
src/test/java/de/tla2b/typechecking/BBuiltInsTest.java
+
12
−
0
View file @
9796cb6e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment