diff options
Diffstat (limited to 'z-yants-tests.nix')
-rw-r--r-- | z-yants-tests.nix | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/z-yants-tests.nix b/z-yants-tests.nix index f468f61322ec..b97d058c0447 100644 --- a/z-yants-tests.nix +++ b/z-yants-tests.nix @@ -1,5 +1,5 @@ -with (import ./yants.nix {}); with builtins; +with (import ./yants.nix {}); # Note: Derivations are not included in the tests below as they cause # issues with deepSeq. @@ -68,4 +68,18 @@ deepSeq rec { (name: age: "${name} is ${toString age} years old"); testFunc = func "Brynhjulf" 42; + + # Test that all types are types. + testTypes = map type [ + any bool drv float int string + + (attrs int) + (either int string) + (enum [ "foo" "bar" ]) + (list string) + (option int) + (option (list string)) + (struct { a = int; b = option string; }) + (sum { a = int; b = option string; }) + ]; } "All tests passed!\n" |