snix/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-thunked-function-calls.nix
Vincent Ambo d3534ee051 fix(depotfmt): only exclude *imported* tvix tests
When we added the Nix language test suite in cl/6126, we excluded the
whole tvix tests folder from Nix formatting. This is unintentional, as
we probably want *our* tests to be formatted correctly.

Change-Id: I2b66d79e30fae17e75d5a1f8c44e279886091c5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11154
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-03-15 14:22:49 +00:00

31 lines
970 B
Nix

[
# This is independent of builtins
(builtins.length [ (builtins.throw "Ferge") (builtins.throw "Wehsal") ])
(builtins.attrNames {
Hans = throw "Castorp";
Joachim = throw "Ziemßen";
James = "Tienappel";
})
(builtins.length (builtins.map builtins.throw [ "Settembrini" "Naphta" ]))
(builtins.attrNames (builtins.mapAttrs builtins.throw {
Clawdia = "Chauchat";
Mynheer = "Peeperkorn";
}))
(builtins.length (builtins.genList (builtins.add "Marusja") 981))
(builtins.length (builtins.genList builtins.throw 3))
# These are hard to get wrong since the outer layer needs to be forced anyways
(builtins.length (builtins.genericClosure {
startSet = [
{ key = 1; initial = true; }
];
operator = { key, initial, ... }:
if initial
then [{ key = key - 1; initial = false; value = throw "lol"; }]
else [ ];
}))
(builtins.length (builtins.concatMap (m: [ m (builtins.throw m) ]) [ "Marusja" ]))
]