Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tlc4b
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
tlc4b
Commits
fc488477
Commit
fc488477
authored
10 months ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Make TestUtil not unwrap BCompoundExceptions
parent
30cb6226
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/tlc4b/util/TestUtil.java
+11
-27
11 additions, 27 deletions
src/test/java/de/tlc4b/util/TestUtil.java
with
11 additions
and
27 deletions
src/test/java/de/tlc4b/util/TestUtil.java
+
11
−
27
View file @
fc488477
...
...
@@ -12,7 +12,6 @@ import java.util.Arrays;
import
java.util.List
;
import
de.be4.classicalb.core.parser.exceptions.BCompoundException
;
import
de.be4.classicalb.core.parser.exceptions.BException
;
import
de.tla2b.exceptions.TLA2BException
;
import
de.tlc4b.TLC4BGlobals
;
import
de.tlc4b.Translator
;
...
...
@@ -80,17 +79,11 @@ public class TestUtil {
assertEquals
(
expectedB
,
actualB
);
}
public
static
void
tryTranslating
(
final
String
machineString
)
throws
BException
{
public
static
void
tryTranslating
(
final
String
machineString
)
throws
B
Compound
Exception
{
TLC4BGlobals
.
setForceTLCToEvalConstants
(
false
);
ToolIO
.
setMode
(
ToolIO
.
TOOL
);
Translator
b2tlaTranslator
;
try
{
b2tlaTranslator
=
new
Translator
(
machineString
);
Translator
b2tlaTranslator
=
new
Translator
(
machineString
);
b2tlaTranslator
.
translate
();
}
catch
(
BCompoundException
e
)
{
throw
e
.
getFirstException
();
}
}
public
static
String
translateTLA2B
(
String
moduleName
,
String
tlaString
,
String
configString
)
...
...
@@ -131,25 +124,16 @@ public class TestUtil {
assertEquals
(
expectedConfig
,
b2tlaTranslator
.
getConfigString
());
}
public
static
void
compareEquals
(
String
expected
,
String
machine
)
throws
BException
{
try
{
public
static
void
compareEquals
(
String
expected
,
String
machine
)
throws
BCompoundException
{
Translator
b2tlaTranslator
=
new
Translator
(
machine
);
b2tlaTranslator
.
translate
();
assertEquals
(
expected
,
b2tlaTranslator
.
getModuleString
());
}
catch
(
BCompoundException
e
)
{
throw
e
.
getFirstException
();
}
}
public
static
String
translate
(
String
machine
)
throws
BException
{
try
{
public
static
String
translate
(
String
machine
)
throws
BCompoundException
{
Translator
translator
=
new
Translator
(
machine
);
translator
.
translate
();
return
translator
.
getModuleString
();
}
catch
(
BCompoundException
e
)
{
throw
e
.
getFirstException
();
}
}
public
static
TLCResult
testString
(
String
machineString
)
throws
IOException
{
...
...
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