diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-24 02:51:28 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-24 02:51:28 +0200 |
commit | 411a3461dca6b26f1a1a6b0c7f1f322f1d8df506 (patch) | |
tree | 2b10ffb51d506686e77eee6b7317dde692327e9e /tests | |
parent | 05d02f798f65bf18e8ca71f3d23bfdf9df63fb7c (diff) | |
download | guix-411a3461dca6b26f1a1a6b0c7f1f322f1d8df506.tar.gz |
Add a test of the type primops
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lang/eval-okay-types.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-types.nix | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-types.exp b/tests/lang/eval-okay-types.exp new file mode 100644 index 0000000000..0287a32b11 --- /dev/null +++ b/tests/lang/eval-okay-types.exp @@ -0,0 +1 @@ +[ true false true false true false true false true false "int" "bool" "string" "null" "attrs" "list" "lambda" "lambda" "lambda" "lambda" ] diff --git a/tests/lang/eval-okay-types.nix b/tests/lang/eval-okay-types.nix new file mode 100644 index 0000000000..c3fe370ef7 --- /dev/null +++ b/tests/lang/eval-okay-types.nix @@ -0,0 +1,23 @@ +with builtins; + +[ (isNull null) + (isNull (x: x)) + (isFunction (x: x)) + (isFunction "fnord") + (isString ("foo" + "bar")) + (isString [ "x" ]) + (isInt (1 + 2)) + (isInt { x = 123; }) + (isBool (true && false)) + (isBool null) + (typeOf (3 * 4)) + (typeOf true) + (typeOf "xyzzy") + (typeOf null) + (typeOf { x = 456; }) + (typeOf [ 1 2 3 ]) + (typeOf (x: x)) + (typeOf ((x: y: x) 1)) + (typeOf map) + (typeOf (map (x: x))) +] |