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
39d9d0dd
Commit
39d9d0dd
authored
2 years ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Further simplify unused parts of AbstractParseModuleTest
parent
dedd7310
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/tla2b/util/AbstractParseModuleTest.java
+4
-19
4 additions, 19 deletions
src/test/java/de/tla2b/util/AbstractParseModuleTest.java
with
4 additions
and
19 deletions
src/test/java/de/tla2b/util/AbstractParseModuleTest.java
+
4
−
19
View file @
39d9d0dd
...
@@ -2,7 +2,6 @@ package de.tla2b.util;
...
@@ -2,7 +2,6 @@ package de.tla2b.util;
import
java.io.File
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
de.tla2b.util.PolySuite.Configuration
;
import
de.tla2b.util.PolySuite.Configuration
;
...
@@ -10,16 +9,7 @@ import de.tla2b.util.PolySuite.Configuration;
...
@@ -10,16 +9,7 @@ import de.tla2b.util.PolySuite.Configuration;
public
abstract
class
AbstractParseModuleTest
{
public
abstract
class
AbstractParseModuleTest
{
private
static
final
String
TLA_SUFFIX
=
".tla"
;
private
static
final
String
TLA_SUFFIX
=
".tla"
;
protected
static
File
[]
getModules
(
String
path
)
{
protected
static
ArrayList
<
File
>
getModulesRecursively
(
String
path
)
{
final
File
dir
=
new
File
(
path
);
return
dir
.
listFiles
((
d
,
name
)
->
name
.
endsWith
(
TLA_SUFFIX
));
}
protected
static
File
[]
getModulesRecursively
(
String
path
)
{
return
walk
(
path
).
toArray
(
new
File
[
0
]);
}
private
static
ArrayList
<
File
>
walk
(
String
path
)
{
File
root
=
new
File
(
path
);
File
root
=
new
File
(
path
);
File
[]
list
=
root
.
listFiles
();
File
[]
list
=
root
.
listFiles
();
...
@@ -29,7 +19,7 @@ public abstract class AbstractParseModuleTest {
...
@@ -29,7 +19,7 @@ public abstract class AbstractParseModuleTest {
for
(
File
f
:
list
)
{
for
(
File
f
:
list
)
{
if
(
f
.
isDirectory
())
{
if
(
f
.
isDirectory
())
{
files
.
addAll
(
walk
(
f
.
getAbsolutePath
()));
files
.
addAll
(
getModulesRecursively
(
f
.
getAbsolutePath
()));
}
else
if
(
f
.
getName
().
endsWith
(
TLA_SUFFIX
))
{
}
else
if
(
f
.
getName
().
endsWith
(
TLA_SUFFIX
))
{
files
.
add
(
f
);
files
.
add
(
f
);
}
}
...
@@ -38,12 +28,7 @@ public abstract class AbstractParseModuleTest {
...
@@ -38,12 +28,7 @@ public abstract class AbstractParseModuleTest {
}
}
protected
static
Configuration
getConfiguration2
(
String
path
)
{
protected
static
Configuration
getConfiguration2
(
String
path
)
{
final
ArrayList
<
Object
>
expectedValues
=
new
ArrayList
<
Object
>();
final
ArrayList
<
File
>
allModules
=
getModulesRecursively
(
path
);
File
[]
modules
=
getModulesRecursively
(
path
);
final
ArrayList
<
File
>
allModules
=
new
ArrayList
<
File
>(
Arrays
.
asList
(
modules
));
for
(
int
i
=
0
;
i
<
modules
.
length
;
i
++)
{
expectedValues
.
add
(
1
);
}
return
new
Configuration
()
{
return
new
Configuration
()
{
public
int
size
()
{
public
int
size
()
{
...
@@ -59,7 +44,7 @@ public abstract class AbstractParseModuleTest {
...
@@ -59,7 +44,7 @@ public abstract class AbstractParseModuleTest {
}
}
public
Object
getExpectedValue
(
int
index
)
{
public
Object
getExpectedValue
(
int
index
)
{
return
expectedValues
.
get
(
index
)
;
return
1
;
}
}
};
};
}
}
...
...
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