summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 11:31:50 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 12:34:22 +0100
commit2bcb384e95500ff197fd4888c659ccf0034cf214 (patch)
tree8b6f37dfd938481fb22cc256080a6e050cbd6da9 /tests/lang
parentc897bac54954373f63511702731fe2cb23c0c98e (diff)
downloadguix-2bcb384e95500ff197fd4888c659ccf0034cf214.tar.gz
Add a test to check that tail calls run in bounded stack space
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-tail-call-1.exp1
-rw-r--r--tests/lang/eval-okay-tail-call-1.nix3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-tail-call-1.exp b/tests/lang/eval-okay-tail-call-1.exp
new file mode 100644
index 0000000000..f7393e847d
--- /dev/null
+++ b/tests/lang/eval-okay-tail-call-1.exp
@@ -0,0 +1 @@
+100000
diff --git a/tests/lang/eval-okay-tail-call-1.nix b/tests/lang/eval-okay-tail-call-1.nix
new file mode 100644
index 0000000000..a3962ce3fd
--- /dev/null
+++ b/tests/lang/eval-okay-tail-call-1.nix
@@ -0,0 +1,3 @@
+let
+  f = n: if n == 100000 then n else f (n + 1);
+in f 0