From 325a7d6fa98ae7dbeabf1d8c1c34c2aed15074dd Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 23 Nov 2022 22:25:32 -0800 Subject: test(tvix/eval): add eval-okay-closure-pointer-compare This test case checks two things: * A sanity check that "pointer equality for functions" means not just the lambda, but also the upvalues. * To be pointer-equal, it is not enough for the upvalues to be normal-form equal (i.e. `nix_eq()`-equal); the upvalues must be *pointer*-equal. The second part of the test case checks for this. Signed-off-by: Adam Joseph Change-Id: I4e59327a6f199b8212e97197b212e3c3934bb3f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7372 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp new file mode 100644 index 0000000000..c3bb809c9f --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp @@ -0,0 +1 @@ +[ false false ] -- cgit 1.4.1