Skip to content

Commit 1e0b089

Browse files
anddannmbenz89
authored andcommitted
add header for licence check
1 parent 04000d0 commit 1e0b089

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

src/test/java/soot/ModuleUtilTest.java

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import org.junit.Test;
44
import org.junit.Assert;
55

6-
public class ModuleUtilTest {
7-
8-
9-
public void buildModuleScene() {
106

7+
/**
8+
* Tests traversing the module graph.
9+
*
10+
* @author Andreas Dann
11+
*/
1112

12-
}
13+
public class ModuleUtilTest {
1314

1415

1516
@Test
@@ -21,16 +22,16 @@ public void ownPackage() {
2122
}
2223

2324
@Test
24-
public void simpleExport(){
25+
public void simpleExport() {
2526
G.reset();
2627
ModuleScene moduleScene = ModuleScene.v();
2728

2829
SootModuleInfo moduleA = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleA");
2930
moduleA.addExportedPackage("de.upb");
3031
moduleScene.addClassSilent(moduleA);
3132

32-
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleB");
33-
moduleB.getRequiredModules().put(moduleA,Modifier.REQUIRES_STATIC);
33+
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleB");
34+
moduleB.getRequiredModules().put(moduleA, Modifier.REQUIRES_STATIC);
3435
moduleScene.addClassSilent(moduleB);
3536

3637
ModuleUtil moduleUtil = ModuleUtil.v();
@@ -41,21 +42,21 @@ public void simpleExport(){
4142

4243

4344
@Test
44-
public void simpleRequiresTransitiveExport(){
45+
public void simpleRequiresTransitiveExport() {
4546
G.reset();
4647
ModuleScene moduleScene = ModuleScene.v();
4748

4849
SootModuleInfo moduleA = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleA");
4950
moduleA.addExportedPackage("de.upb");
5051
moduleScene.addClassSilent(moduleA);
5152

52-
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleB");
53-
moduleB.getRequiredModules().put(moduleA,Modifier.REQUIRES_TRANSITIVE);
53+
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleB");
54+
moduleB.getRequiredModules().put(moduleA, Modifier.REQUIRES_TRANSITIVE);
5455
moduleScene.addClassSilent(moduleB);
5556

5657

57-
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleC");
58-
moduleC.getRequiredModules().put(moduleB,Modifier.REQUIRES_STATIC);
58+
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleC");
59+
moduleC.getRequiredModules().put(moduleB, Modifier.REQUIRES_STATIC);
5960
moduleScene.addClassSilent(moduleC);
6061

6162
ModuleUtil moduleUtil = ModuleUtil.v();
@@ -66,26 +67,26 @@ public void simpleRequiresTransitiveExport(){
6667

6768

6869
@Test
69-
public void TwoLevelRequiresTransitiveExport(){
70+
public void TwoLevelRequiresTransitiveExport() {
7071
G.reset();
7172
ModuleScene moduleScene = ModuleScene.v();
7273

7374
SootModuleInfo moduleA = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleA");
7475
moduleA.addExportedPackage("de.upb");
7576
moduleScene.addClassSilent(moduleA);
7677

77-
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleB");
78-
moduleB.getRequiredModules().put(moduleA,Modifier.REQUIRES_TRANSITIVE);
78+
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleB");
79+
moduleB.getRequiredModules().put(moduleA, Modifier.REQUIRES_TRANSITIVE);
7980
moduleScene.addClassSilent(moduleB);
8081

8182

82-
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleC");
83-
moduleC.getRequiredModules().put(moduleB,Modifier.REQUIRES_TRANSITIVE);
83+
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleC");
84+
moduleC.getRequiredModules().put(moduleB, Modifier.REQUIRES_TRANSITIVE);
8485
moduleScene.addClassSilent(moduleC);
8586

8687

87-
SootModuleInfo moduleD = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleD");
88-
moduleD.getRequiredModules().put(moduleC,Modifier.REQUIRES_STATIC);
88+
SootModuleInfo moduleD = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleD");
89+
moduleD.getRequiredModules().put(moduleC, Modifier.REQUIRES_STATIC);
8990
moduleScene.addClassSilent(moduleD);
9091

9192
ModuleUtil moduleUtil = ModuleUtil.v();
@@ -97,26 +98,26 @@ public void TwoLevelRequiresTransitiveExport(){
9798

9899
//the test should fail, as the requires transitive relations are not set in the module graph
99100
@Test
100-
public void TwoLevelRequiresTransitiveExportFailing(){
101+
public void TwoLevelRequiresTransitiveExportFailing() {
101102
G.reset();
102103
ModuleScene moduleScene = ModuleScene.v();
103104

104105
SootModuleInfo moduleA = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleA");
105106
moduleA.addExportedPackage("de.upb");
106107
moduleScene.addClassSilent(moduleA);
107108

108-
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleB");
109-
moduleB.getRequiredModules().put(moduleA,Modifier.REQUIRES_TRANSITIVE);
109+
SootModuleInfo moduleB = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleB");
110+
moduleB.getRequiredModules().put(moduleA, Modifier.REQUIRES_TRANSITIVE);
110111
moduleScene.addClassSilent(moduleB);
111112

112113

113-
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleC");
114-
moduleC.getRequiredModules().put(moduleB,Modifier.REQUIRES_STATIC);
114+
SootModuleInfo moduleC = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleC");
115+
moduleC.getRequiredModules().put(moduleB, Modifier.REQUIRES_STATIC);
115116
moduleScene.addClassSilent(moduleC);
116117

117118

118-
SootModuleInfo moduleD = new SootModuleInfo(SootModuleInfo.MODULE_INFO,"moduleD");
119-
moduleD.getRequiredModules().put(moduleC,Modifier.REQUIRES_STATIC);
119+
SootModuleInfo moduleD = new SootModuleInfo(SootModuleInfo.MODULE_INFO, "moduleD");
120+
moduleD.getRequiredModules().put(moduleC, Modifier.REQUIRES_STATIC);
120121
moduleScene.addClassSilent(moduleD);
121122

122123
ModuleUtil moduleUtil = ModuleUtil.v();

0 commit comments

Comments
 (0)