about summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-08-19T09·59+0200
committerEelco Dolstra <edolstra@gmail.com>2018-08-19T09·59+0200
commit9b1bdf2db8798c024e6fbe84d4144c04f61d80c7 (patch)
treefef23a9b3c8ca9a6cf61a4c60e9fdf7c855ea6fc /tests/lang
parentd277442df53a01343ba7c1df0bbd2a294058dcba (diff)
FIx floating point evaluation
Fixes #2361.
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-float.exp1
-rw-r--r--tests/lang/eval-okay-float.nix6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-float.exp b/tests/lang/eval-okay-float.exp
new file mode 100644
index 000000000000..3c50a8adce86
--- /dev/null
+++ b/tests/lang/eval-okay-float.exp
@@ -0,0 +1 @@
+[ 3.4 3.5 2.5 1.5 ]
diff --git a/tests/lang/eval-okay-float.nix b/tests/lang/eval-okay-float.nix
new file mode 100644
index 000000000000..b2702c7b1668
--- /dev/null
+++ b/tests/lang/eval-okay-float.nix
@@ -0,0 +1,6 @@
+[
+  (1.1 + 2.3)
+  (builtins.add (0.5 + 0.5) (2.0 + 0.5))
+  ((0.5 + 0.5) * (2.0 + 0.5))
+  ((1.5 + 1.5) / (0.5 * 4.0))
+]