Skip to content

Commit beab8ab

Browse files
committed
Test claims regarding SpEL support for T(Character)
See gh-28112
1 parent 6f41180 commit beab8ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -420,7 +420,11 @@ public void testIndexerError() {
420420

421421
@Test
422422
public void testStaticRef02() {
423-
evaluate("T(java.awt.Color).green.getRGB()!=0", "true", Boolean.class);
423+
evaluate("T(java.awt.Color).green.getRGB() != 0", true, Boolean.class);
424+
evaluate("(T(java.lang.Math).random() * 100.0 ) > 0", true, Boolean.class);
425+
evaluate("(T(Math).random() * 100.0) > 0", true, Boolean.class);
426+
evaluate("T(Character).isUpperCase('Test'.charAt(0)) ? 'uppercase' : 'lowercase'", "uppercase", String.class);
427+
evaluate("T(Character).isUpperCase('Test'.charAt(1)) ? 'uppercase' : 'lowercase'", "lowercase", String.class);
424428
}
425429

426430
// variables and functions

0 commit comments

Comments
 (0)