From 62b5e4276975ab180617f7d887d1fc6362e67172 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:24:27 +0100 Subject: [PATCH] Fix syntax for disabled selection/projection tests in ParsingTests --- .../expression/spel/ParsingTests.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java index 8b201ac9a3..5bd15b113d 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,31 +177,27 @@ class ParsingTests { "(#fact={|n| ($n <= 1) ? 1 : ($n * #fact(($n - 1))) };#fact(5))"); } - @Disabled("Unsupported syntax/feature") @Test void projection() { - parseCheck("{1,2,3,4,5,6,7,8,9,10}.!{#isEven()}"); + parseCheck("{1,2,3,4,5,6,7,8,9,10}.![#isEven()]"); } - @Disabled("Unsupported syntax/feature") @Test void selection() { - parseCheck("{1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this) == 'y'}", - "{1,2,3,4,5,6,7,8,9,10}.?{(#isEven(#this) == 'y')}"); + parseCheck("{1,2,3,4,5,6,7,8,9,10}.?[#isEven(#this) == 'y']", + "{1,2,3,4,5,6,7,8,9,10}.?[(#isEven(#this) == 'y')]"); } - @Disabled("Unsupported syntax/feature") @Test void selectionFirst() { - parseCheck("{1,2,3,4,5,6,7,8,9,10}.^{#isEven(#this) == 'y'}", - "{1,2,3,4,5,6,7,8,9,10}.^{(#isEven(#this) == 'y')}"); + parseCheck("{1,2,3,4,5,6,7,8,9,10}.^[#isEven(#this) == 'y']", + "{1,2,3,4,5,6,7,8,9,10}.^[(#isEven(#this) == 'y')]"); } - @Disabled("Unsupported syntax/feature") @Test void selectionLast() { - parseCheck("{1,2,3,4,5,6,7,8,9,10}.${#isEven(#this) == 'y'}", - "{1,2,3,4,5,6,7,8,9,10}.${(#isEven(#this) == 'y')}"); + parseCheck("{1,2,3,4,5,6,7,8,9,10}.$[#isEven(#this) == 'y']", + "{1,2,3,4,5,6,7,8,9,10}.$[(#isEven(#this) == 'y')]"); } }