]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Tests for unary negation
authorAlan T. DeKok <aland@freeradius.org>
Sun, 4 Jan 2015 21:13:07 +0000 (16:13 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 4 Jan 2015 21:13:07 +0000 (16:13 -0500)
src/tests/keywords/expr

index 8f3b2a9896fe2a7d0ffe058ccb069c3fd9347cf2..34e7ddf0aa86828d127848122615f650da86639f 100644 (file)
@@ -82,4 +82,20 @@ if ("%{expr: 1 << 2 | 1}" != 5) {
        update reply {
                Filter-Id := "fail-10"
        }
-}
\ No newline at end of file
+}
+
+#
+#  Unary negation
+#
+if ("%{expr: 6 + -(1 + 3)}" != 2) {
+       update reply {
+               Filter-Id := "fail-11"
+       }
+}
+
+if ("%{expr: 6 * -&Tmp-Integer-2}" != -24) {
+       update reply {
+               Filter-Id := "fail-11"
+       }
+}
+