Skip to content

Commit 62b5e42

Browse files
committed
Fix syntax for disabled selection/projection tests in ParsingTests
1 parent 1631be5 commit 62b5e42

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -177,31 +177,27 @@ void lambdaFactorial() {
177177
"(#fact={|n| ($n <= 1) ? 1 : ($n * #fact(($n - 1))) };#fact(5))");
178178
}
179179

180-
@Disabled("Unsupported syntax/feature")
181180
@Test
182181
void projection() {
183-
parseCheck("{1,2,3,4,5,6,7,8,9,10}.!{#isEven()}");
182+
parseCheck("{1,2,3,4,5,6,7,8,9,10}.![#isEven()]");
184183
}
185184

186-
@Disabled("Unsupported syntax/feature")
187185
@Test
188186
void selection() {
189-
parseCheck("{1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this) == 'y'}",
190-
"{1,2,3,4,5,6,7,8,9,10}.?{(#isEven(#this) == 'y')}");
187+
parseCheck("{1,2,3,4,5,6,7,8,9,10}.?[#isEven(#this) == 'y']",
188+
"{1,2,3,4,5,6,7,8,9,10}.?[(#isEven(#this) == 'y')]");
191189
}
192190

193-
@Disabled("Unsupported syntax/feature")
194191
@Test
195192
void selectionFirst() {
196-
parseCheck("{1,2,3,4,5,6,7,8,9,10}.^{#isEven(#this) == 'y'}",
197-
"{1,2,3,4,5,6,7,8,9,10}.^{(#isEven(#this) == 'y')}");
193+
parseCheck("{1,2,3,4,5,6,7,8,9,10}.^[#isEven(#this) == 'y']",
194+
"{1,2,3,4,5,6,7,8,9,10}.^[(#isEven(#this) == 'y')]");
198195
}
199196

200-
@Disabled("Unsupported syntax/feature")
201197
@Test
202198
void selectionLast() {
203-
parseCheck("{1,2,3,4,5,6,7,8,9,10}.${#isEven(#this) == 'y'}",
204-
"{1,2,3,4,5,6,7,8,9,10}.${(#isEven(#this) == 'y')}");
199+
parseCheck("{1,2,3,4,5,6,7,8,9,10}.$[#isEven(#this) == 'y']",
200+
"{1,2,3,4,5,6,7,8,9,10}.$[(#isEven(#this) == 'y')]");
205201
}
206202
}
207203

0 commit comments

Comments
 (0)