summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-02 15:21:17 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-08-02 15:21:17 +0000
commit159e621d1a9c4391b53f3d822109c36931934698 (patch)
tree848dc085309b9c8c18b655afcba1d722564e9c79 /tests
parent511455965e1a17db3653147a4ac0d284a37915be (diff)
downloadguix-159e621d1a9c4391b53f3d822109c36931934698.tar.gz
Overload the ‘+’ operator to support integer addition
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/eval-okay-arithmetic.exp2
-rw-r--r--tests/lang/eval-okay-arithmetic.nix6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/lang/eval-okay-arithmetic.exp b/tests/lang/eval-okay-arithmetic.exp
index 9c113c6f75..861c12661a 100644
--- a/tests/lang/eval-okay-arithmetic.exp
+++ b/tests/lang/eval-okay-arithmetic.exp
@@ -1 +1 @@
-1275
+1854
diff --git a/tests/lang/eval-okay-arithmetic.nix b/tests/lang/eval-okay-arithmetic.nix
index ac1fcb73c0..1f45b122a2 100644
--- a/tests/lang/eval-okay-arithmetic.nix
+++ b/tests/lang/eval-okay-arithmetic.nix
@@ -8,14 +8,14 @@ let {
     else [first] ++ range (builtins.add first 1) last;
 
   /* Supposedly tail recursive version:
-  
-  range_ = accum: first: last: 
+
+  range_ = accum: first: last:
     if first == last then ([first] ++ accum)
     else range_ ([first] ++ accum) (builtins.add first 1) last;
 
   range = range_ [];
   */
 
-  body = sum (range 1 50);
+  body = sum (range 1 50) + 123 + 456;
 
 }