follow runTests change prefixing all tests by "test"
svn path=/nixpkgs/trunk/; revision=18538
This commit is contained in:
parent
02972b92d5
commit
88e654b1ed
@ -3,52 +3,52 @@ with import ./default.nix;
|
|||||||
|
|
||||||
runTests {
|
runTests {
|
||||||
|
|
||||||
id = {
|
testId = {
|
||||||
expr = id 1;
|
expr = id 1;
|
||||||
expected = 1;
|
expected = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
const = {
|
testConst = {
|
||||||
expr = const 2 3;
|
expr = const 2 3;
|
||||||
expected = 2;
|
expected = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
or = {
|
testOr = {
|
||||||
expr = or true false;
|
expr = or true false;
|
||||||
expected = true;
|
expected = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
and = {
|
testAnd = {
|
||||||
expr = and true false;
|
expr = and true false;
|
||||||
expected = false;
|
expected = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
fix = {
|
testFix = {
|
||||||
expr = fix (x: {a = if x ? a then "a" else "b";});
|
expr = fix (x: {a = if x ? a then "a" else "b";});
|
||||||
expected = {a = "a";};
|
expected = {a = "a";};
|
||||||
};
|
};
|
||||||
|
|
||||||
concatMapStrings = {
|
testConcatMapStrings = {
|
||||||
expr = concatMapStrings (x: x + ";") ["a" "b" "c"];
|
expr = concatMapStrings (x: x + ";") ["a" "b" "c"];
|
||||||
expected = "a;b;c;";
|
expected = "a;b;c;";
|
||||||
};
|
};
|
||||||
|
|
||||||
concatStringsSep = {
|
testConcatStringsSep = {
|
||||||
expr = concatStringsSep "," ["a" "b" "c"];
|
expr = concatStringsSep "," ["a" "b" "c"];
|
||||||
expected = "a,b,c";
|
expected = "a,b,c";
|
||||||
};
|
};
|
||||||
|
|
||||||
filter = {
|
testFilter = {
|
||||||
expr = filter (x: x != "a") ["a" "b" "c" "a"];
|
expr = filter (x: x != "a") ["a" "b" "c" "a"];
|
||||||
expected = ["b" "c"];
|
expected = ["b" "c"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fold = {
|
testFold = {
|
||||||
expr = fold (builtins.add) 0 (range 0 100);
|
expr = fold (builtins.add) 0 (range 0 100);
|
||||||
expected = 5050;
|
expected = 5050;
|
||||||
};
|
};
|
||||||
|
|
||||||
eqStrict = {
|
testEqStrict = {
|
||||||
expr = all id [
|
expr = all id [
|
||||||
(eqStrict 2 2)
|
(eqStrict 2 2)
|
||||||
(!eqStrict 3 2)
|
(!eqStrict 3 2)
|
||||||
@ -61,7 +61,7 @@ runTests {
|
|||||||
expected = true;
|
expected = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
overridableDelayableArgsTest = {
|
testOverridableDelayableArgsTest = {
|
||||||
expr =
|
expr =
|
||||||
let res1 = defaultOverridableDelayableArgs id {};
|
let res1 = defaultOverridableDelayableArgs id {};
|
||||||
res2 = defaultOverridableDelayableArgs id { a = 7; };
|
res2 = defaultOverridableDelayableArgs id { a = 7; };
|
||||||
|
Loading…
Reference in New Issue
Block a user