aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-02-09 15:24:57 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-02-15 12:51:25 +0000
commit56286fd2b84eb28605314ef7bd587394a9156b63 (patch)
tree82133ed80e3c25ff1d78d759222a6fd0216ca810 /test cases
parent9e6d3f903c7e828823eb4544c83bf340ff593f95 (diff)
downloadmeson-56286fd2b84eb28605314ef7bd587394a9156b63.zip
meson-56286fd2b84eb28605314ef7bd587394a9156b63.tar.gz
meson-56286fd2b84eb28605314ef7bd587394a9156b63.tar.bz2
Fix test cases/failing/52 inconsistent comparison
Since PR #2884, this is failing with an exception Keep the behaviour we have had since PR #1810 (0.41.0), that ordering comparisons of different types fail with an InterpreterException. Also warn about equality comparisons of different types, which will one day become an error, as per PR #2884.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/19 comparison/meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/test cases/common/19 comparison/meson.build b/test cases/common/19 comparison/meson.build
index c4cff9f..fb641ed 100644
--- a/test cases/common/19 comparison/meson.build
+++ b/test cases/common/19 comparison/meson.build
@@ -126,3 +126,14 @@ test('equalfalse', exe13)
test('equaltrue', exe14)
test('nequaltrue', exe15)
test('nequalfalse', exe16)
+
+# Equality comparisons of different elementary types
+# (these all cause warnings currently, will become an error in future)
+
+assert([] != 'st', 'not equal')
+assert([] != 1, 'not equal')
+assert(2 != 'st', 'not equal')
+
+assert(not ([] == 'st'), 'not equal')
+assert(not ([] == 1), 'not equal')
+assert(not (2 == 'st'), 'not equal')