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/eval-okay-arithmetic.nix | |
parent | 159e621d1a9c4391b53f3d822109c36931934698 (diff) |
Add a unary integer negation operator
This allows saying "-1" instead of "builtins.sub 0 1".
Diffstat (limited to 'tests/lang/eval-okay-arithmetic.nix')
-rw-r--r-- | tests/lang/eval-okay-arithmetic.nix | 7 |
1 files changed, 6 insertions, 1 deletions
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) + ]; } |