tests/functional2/lang: Migrate arithmetic tests

Change-Id: I73259875debc053dca46fe34f9f8d10b8486fa4f
This commit is contained in:
piegames
2025-09-18 23:38:46 +02:00
parent 096aa37cf1
commit fe7a8d5e67
16 changed files with 23 additions and 8 deletions
@@ -1 +0,0 @@
--extra-deprecated-features shadow-internal-symbols
@@ -1,5 +1,5 @@
error: integer overflow in adding 9223372036854775807 + 1
at /pwd/eval-fail-overflowing-add.nix:4:8:
at /pwd/in.nix:4:8:
3| b = 1;
4| in a + b
| ^
@@ -1,20 +1,20 @@
error:
… while calling the 'seq' builtin
at /pwd/eval-fail-overflowing-div.nix:7:4:
at /pwd/in.nix:7:4:
6| b = -1;
7| in builtins.seq intMin (builtins.seq b (intMin / b))
| ^
8|
… while calling the 'seq' builtin
at /pwd/eval-fail-overflowing-div.nix:7:25:
at /pwd/in.nix:7:25:
6| b = -1;
7| in builtins.seq intMin (builtins.seq b (intMin / b))
| ^
8|
… while calling the 'div' builtin
at /pwd/eval-fail-overflowing-div.nix:7:48:
at /pwd/in.nix:7:48:
6| b = -1;
7| in builtins.seq intMin (builtins.seq b (intMin / b))
| ^
@@ -1,13 +1,13 @@
error:
… while calling the 'mul' builtin
at /pwd/eval-fail-overflowing-mul.nix:3:10:
at /pwd/in.nix:3:10:
2| a = 4294967297;
3| in a * a * a
| ^
4|
… while calling the 'mul' builtin
at /pwd/eval-fail-overflowing-mul.nix:3:6:
at /pwd/in.nix:3:6:
2| a = 4294967297;
3| in a * a * a
| ^
@@ -1,6 +1,6 @@
error:
… while calling the 'sub' builtin
at /pwd/eval-fail-overflowing-sub.nix:4:6:
at /pwd/in.nix:4:6:
3| b = 2;
4| in a - b
| ^
@@ -0,0 +1,16 @@
[[test]]
runner = "eval-okay"
[[test]]
runner = "eval-okay"
in = "in-override.nix"
flags = [ "--extra-deprecated-features", "shadow-internal-symbols" ]
[[test]]
runner = "eval-fail"
in = [ "in-overflowing-add.nix", "in-overflowing-div.nix", "in-overflowing-mul.nix", "in-overflowing-sub.nix" ]
matrix = true
[[test]]
runner = "parse-okay"
in = "in-precedence.nix"