diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-08-02T15·35+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-08-02T15·43+0000 |
commit | 5d147e125cea69e9a3b12f0ef64c64f42985c65e (patch) | |
tree | 0e9611fb64739f094fe0652ff71586c9ad7fd368 /tests/lang | |
parent | 159e621d1a9c4391b53f3d822109c36931934698 (diff) |
Add a unary integer negation operator
This allows saying "-1" instead of "builtins.sub 0 1".
Diffstat (limited to 'tests/lang')
-rw-r--r-- | tests/lang/eval-okay-arithmetic.exp | 2 | ||||
-rw-r--r-- | tests/lang/eval-okay-arithmetic.nix | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/lang/eval-okay-arithmetic.exp b/tests/lang/eval-okay-arithmetic.exp index 861c12661a83..f625eb6ab6ab 100644 --- a/tests/lang/eval-okay-arithmetic.exp +++ b/tests/lang/eval-okay-arithmetic.exp @@ -1 +1 @@ -1854 +1843 diff --git a/tests/lang/eval-okay-arithmetic.nix b/tests/lang/eval-okay-arithmetic.nix index 1f45b122a2bb..76bef919bdab 100644 --- a/tests/lang/eval-okay-arithmetic.nix +++ b/tests/lang/eval-okay-arithmetic.nix @@ -16,6 +16,11 @@ let { range = range_ []; */ - body = sum (range 1 50) + 123 + 456; + x = 12; + body = sum + [ (sum (range 1 50)) + (123 + 456) + (0 + -10 + -(-11) + -x) + ]; } |