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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tla2bAST
Commits
8bb35cac
Commit
8bb35cac
authored
1 year ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Replace uses of deprecated BParser methods
parent
559efc43
No related branches found
No related tags found
No related merge requests found
Pipeline
#129010
passed
1 year ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/de/tla2b/prettyprintb/OperationsTest.java
+2
-3
2 additions, 3 deletions
src/test/java/de/tla2b/prettyprintb/OperationsTest.java
src/test/java/de/tla2b/util/TestUtil.java
+3
-3
3 additions, 3 deletions
src/test/java/de/tla2b/util/TestUtil.java
with
5 additions
and
6 deletions
src/test/java/de/tla2b/prettyprintb/OperationsTest.java
+
2
−
3
View file @
8bb35cac
...
@@ -29,7 +29,7 @@ public class OperationsTest {
...
@@ -29,7 +29,7 @@ public class OperationsTest {
// parse pretty print result
// parse pretty print result
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
Start
ppStart
=
parser
.
parse
(
pp
.
getPrettyPrint
()
,
false
);
final
Start
ppStart
=
parser
.
parse
Machine
(
pp
.
getPrettyPrint
());
String
ppTree
=
TestUtil
.
getTreeAsString
(
ppStart
);
String
ppTree
=
TestUtil
.
getTreeAsString
(
ppStart
);
// comparing result with pretty print
// comparing result with pretty print
...
@@ -40,8 +40,7 @@ public class OperationsTest {
...
@@ -40,8 +40,7 @@ public class OperationsTest {
File
expectedMachine
=
new
File
(
"src/test/resources/prettyprint/OperationsTest/OperationsTest.mch"
);
File
expectedMachine
=
new
File
(
"src/test/resources/prettyprint/OperationsTest/OperationsTest.mch"
);
final
BParser
expectedParser
=
new
BParser
(
"testcase"
);
final
BParser
expectedParser
=
new
BParser
(
"testcase"
);
final
Start
expectedStart
=
expectedParser
.
parseFile
(
expectedMachine
,
final
Start
expectedStart
=
expectedParser
.
parseFile
(
expectedMachine
);
false
);
String
expectedTree
=
TestUtil
.
getTreeAsString
(
expectedStart
);
String
expectedTree
=
TestUtil
.
getTreeAsString
(
expectedStart
);
...
...
This diff is collapsed.
Click to expand it.
src/test/java/de/tla2b/util/TestUtil.java
+
3
−
3
View file @
8bb35cac
...
@@ -56,7 +56,7 @@ public class TestUtil {
...
@@ -56,7 +56,7 @@ public class TestUtil {
start
.
apply
(
pp
);
start
.
apply
(
pp
);
System
.
out
.
println
(
pp
.
getPrettyPrint
());
System
.
out
.
println
(
pp
.
getPrettyPrint
());
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
Start
ppStart
=
parser
.
parse
(
pp
.
getPrettyPrint
()
,
false
);
final
Start
ppStart
=
parser
.
parse
Machine
(
pp
.
getPrettyPrint
());
String
result
=
getTreeAsString
(
start
);
String
result
=
getTreeAsString
(
start
);
String
ppResult
=
getTreeAsString
(
ppStart
);
String
ppResult
=
getTreeAsString
(
ppStart
);
...
@@ -124,7 +124,7 @@ public class TestUtil {
...
@@ -124,7 +124,7 @@ public class TestUtil {
pp
.
setRenaming
(
new
SuffixIdentifierRenaming
());
pp
.
setRenaming
(
new
SuffixIdentifierRenaming
());
start
.
apply
(
pp
);
start
.
apply
(
pp
);
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
BParser
parser
=
new
BParser
(
"testcase"
);
parser
.
parse
(
pp
.
getPrettyPrint
()
,
false
);
parser
.
parse
Machine
(
pp
.
getPrettyPrint
());
}
}
public
static
TestTypeChecker
typeCheckString
(
String
moduleString
)
throws
TLA2BException
{
public
static
TestTypeChecker
typeCheckString
(
String
moduleString
)
throws
TLA2BException
{
...
@@ -155,7 +155,7 @@ public class TestUtil {
...
@@ -155,7 +155,7 @@ public class TestUtil {
public
static
String
getAstStringofBMachineString
(
final
String
testMachine
)
throws
BCompoundException
{
public
static
String
getAstStringofBMachineString
(
final
String
testMachine
)
throws
BCompoundException
{
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
BParser
parser
=
new
BParser
(
"testcase"
);
final
Start
startNode
=
parser
.
parse
(
testMachine
,
false
);
final
Start
startNode
=
parser
.
parse
Machine
(
testMachine
);
return
getTreeAsString
(
startNode
);
return
getTreeAsString
(
startNode
);
}
}
...
...
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