110
110
import static org .junit .Assert .assertTrue ;
111
111
import static org .junit .Assert .fail ;
112
112
import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
113
- import static spoon .test .SpoonTestHelpers .assumeNotWindows ;
114
113
import static spoon .testing .utils .ModelUtils .build ;
115
114
import static spoon .testing .utils .ModelUtils .buildClass ;
116
115
117
116
public class PositionTest {
118
117
119
118
@ Test
120
119
public void testPositionClass () {
121
- assumeNotWindows (); // FIXME Make test case pass on Windows
122
120
final Factory build = build (new File ("src/test/java/spoon/test/position/testclasses/" ));
123
121
final CtType <FooClazz > foo = build .Type ().get (FooClazz .class );
124
122
String classContent = getClassContent (foo );
@@ -150,7 +148,6 @@ public void testPositionClass() {
150
148
151
149
@ Test
152
150
public void testPositionClassWithComments () {
153
- assumeNotWindows (); // FIXME Make test case pass on Windows
154
151
//contract: check that comments before and after the 'class' keyword are handled well by PositionBuilder
155
152
//and it produces correct `modifierEnd`
156
153
final Factory build = build (new File ("src/test/java/spoon/test/position/testclasses/" ));
@@ -191,7 +188,6 @@ public void testPositionClassWithComments() {
191
188
192
189
@ Test
193
190
public void testPositionParameterTypeReference () throws Exception {
194
- assumeNotWindows (); // FIXME Make test case pass on Windows
195
191
//contract: the parameterized type reference has a source position which includes parameter types, etc.
196
192
final CtType <?> foo = buildClass (PositionParameterTypeWithReference .class );
197
193
String classContent = getClassContent (foo );
@@ -239,7 +235,6 @@ public void testPositionParameterTypeReference() throws Exception {
239
235
240
236
@ Test
241
237
public void testPositionInterface () {
242
- assumeNotWindows (); // FIXME Make test case pass on Windows
243
238
final Factory build = build (new File ("src/test/java/spoon/test/position/testclasses/" ));
244
239
final CtType <FooInterface > foo = build .Type ().get (FooInterface .class );
245
240
String classContent = getClassContent (foo );
@@ -274,7 +269,6 @@ public void testPositionInterface() {
274
269
275
270
@ Test
276
271
public void testPositionAnnotation () {
277
- assumeNotWindows (); // FIXME Make test case pass on Windows
278
272
final Factory build = build (new File ("src/test/java/spoon/test/position/testclasses/" ));
279
273
final CtType <FooAnnotation > foo = build .Type ().get (FooAnnotation .class );
280
274
String classContent = getClassContent (foo );
@@ -318,7 +312,6 @@ public void testPositionAnnotation() {
318
312
319
313
@ Test
320
314
public void testPositionField () throws Exception {
321
- assumeNotWindows (); // FIXME Make test case pass on Windows
322
315
final Factory build = build (FooField .class );
323
316
final CtType <FooField > foo = build .Type ().get (FooField .class );
324
317
String classContent = getClassContent (foo );
@@ -382,7 +375,6 @@ public void testPositionField() throws Exception {
382
375
383
376
@ Test
384
377
public void testPositionGeneric () throws Exception {
385
- assumeNotWindows (); // FIXME Make test case pass on Windows
386
378
final Factory build = build (FooGeneric .class );
387
379
final CtClass <FooGeneric > foo = build .Class ().get (FooGeneric .class );
388
380
String classContent = getClassContent (foo );
@@ -444,7 +436,6 @@ public void testPositionTerminates() {
444
436
445
437
@ Test
446
438
public void testPositionMethod () throws Exception {
447
- assumeNotWindows (); // FIXME Make test case pass on Windows
448
439
final Factory build = build (FooMethod .class );
449
440
final CtClass <FooMethod > foo = build .Class ().get (FooMethod .class );
450
441
String classContent = getClassContent (foo );
@@ -515,7 +506,6 @@ public void testPositionMethod() throws Exception {
515
506
516
507
@ Test
517
508
public void testPositionAbstractMethod () throws Exception {
518
- assumeNotWindows (); // FIXME Make test case pass on Windows
519
509
final Factory build = build (FooAbstractMethod .class );
520
510
final CtClass <FooMethod > foo = build .Class ().get (FooAbstractMethod .class );
521
511
String classContent = getClassContent (foo );
@@ -550,7 +540,6 @@ public void testPositionAbstractMethod() throws Exception {
550
540
551
541
@ Test
552
542
public void testPositionStatement () throws Exception {
553
- assumeNotWindows (); // FIXME Make test case pass on Windows
554
543
final Factory build = build (FooStatement .class );
555
544
final CtType <FooStatement > foo = build .Type ().get (FooStatement .class );
556
545
String classContent = getClassContent (foo );
@@ -744,7 +733,6 @@ public void testPositionMethodTypeParameter() throws Exception {
744
733
745
734
@ Test
746
735
public void testPositionOfAnnonymousType () throws Exception {
747
- assumeNotWindows (); // FIXME Make test case pass on Windows
748
736
//contract: the annonymous type has consistent position
749
737
final CtEnum foo = (CtEnum ) buildClass (SomeEnum .class );
750
738
String classContent = getClassContent (foo );
@@ -929,7 +917,6 @@ public void testPositionTryCatch() throws Exception {
929
917
}
930
918
@ Test
931
919
public void testArrayArgParameter () throws Exception {
932
- assumeNotWindows (); // FIXME Make test case pass on Windows
933
920
//contract: the parameter declared like `String arg[]`, `String[] arg` and `String []arg` has correct positions
934
921
final CtType <?> foo = buildClass (ArrayArgParameter .class );
935
922
String classContent = getClassContent (foo );
@@ -980,7 +967,6 @@ public void testArrayArgParameter() throws Exception {
980
967
981
968
@ Test
982
969
public void testExpressions () throws Exception {
983
- assumeNotWindows (); // FIXME Make test case pass on Windows
984
970
//contract: the expression including type casts has correct position which includes all brackets too
985
971
final CtType <?> foo = buildClass (Expressions .class );
986
972
String classContent = getClassContent (foo );
@@ -1027,7 +1013,6 @@ public void testExpressions() throws Exception {
1027
1013
}
1028
1014
@ Test
1029
1015
public void testCatchPosition () throws Exception {
1030
- assumeNotWindows (); // FIXME Make test case pass on Windows
1031
1016
//contract: check the catch position
1032
1017
final CtType <?> foo = buildClass (CatchPosition .class );
1033
1018
String classContent = getClassContent (foo );
@@ -1090,7 +1075,6 @@ public void testCatchPosition() throws Exception {
1090
1075
}
1091
1076
@ Test
1092
1077
public void testEnumConstructorCallComment () throws Exception {
1093
- assumeNotWindows (); // FIXME Make test case pass on Windows
1094
1078
//contract: check position the enum constructor call
1095
1079
final CtType <?> foo = buildClass (FooEnum .class );
1096
1080
@@ -1108,7 +1092,6 @@ public void testEnumConstructorCallComment() throws Exception {
1108
1092
}
1109
1093
@ Test
1110
1094
public void testSwitchCase () throws Exception {
1111
- assumeNotWindows (); // FIXME Make test case pass on Windows
1112
1095
//contract: check position of the statements of the case of switch
1113
1096
final CtType <?> foo = buildClass (FooSwitch .class );
1114
1097
@@ -1146,7 +1129,6 @@ public void testSwitchCase() throws Exception {
1146
1129
}
1147
1130
@ Test
1148
1131
public void testFooForEach () throws Exception {
1149
- assumeNotWindows (); // FIXME Make test case pass on Windows
1150
1132
//contract: check position of the for each position
1151
1133
final CtType <?> foo = buildClass (FooForEach .class );
1152
1134
@@ -1288,7 +1270,6 @@ public void testPackageDeclarationPosition() throws Exception {
1288
1270
1289
1271
@ Test
1290
1272
public void testImportPosition () throws Exception {
1291
- assumeNotWindows (); // FIXME Make test case pass on Windows
1292
1273
// contract: import position includes its comment
1293
1274
CtType <?> type = ModelUtils .buildClass (cfg -> {
1294
1275
cfg .getEnvironment ().setCommentEnabled (true );
@@ -1306,7 +1287,6 @@ public void testImportPosition() throws Exception {
1306
1287
1307
1288
@ Test
1308
1289
public void testPackageDeclarationWithCommentPosition () throws Exception {
1309
- assumeNotWindows (); // FIXME Make test case pass on Windows
1310
1290
// contract: package declaration position includes its comment. The file comment is not included
1311
1291
CtType <?> type = ModelUtils .buildClass (cfg -> {
1312
1292
cfg .getEnvironment ().setCommentEnabled (true );
0 commit comments