mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
lib/tests/misc.nix: move testFix into new category FIXED-POINTS
This commit is contained in:
parent
55261c94ad
commit
6749b1c4bc
1 changed files with 7 additions and 5 deletions
|
@ -233,11 +233,6 @@ runTests {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
testFix = {
|
|
||||||
expr = fix (x: {a = if x ? a then "a" else "b";});
|
|
||||||
expected = {a = "a";};
|
|
||||||
};
|
|
||||||
|
|
||||||
testComposeExtensions = {
|
testComposeExtensions = {
|
||||||
expr = let obj = makeExtensible (self: { foo = self.bar; });
|
expr = let obj = makeExtensible (self: { foo = self.bar; });
|
||||||
f = self: super: { bar = false; baz = true; };
|
f = self: super: { bar = false; baz = true; };
|
||||||
|
@ -1237,6 +1232,13 @@ runTests {
|
||||||
attrsToList { someFunc= a: a + 1;}
|
attrsToList { someFunc= a: a + 1;}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# FIXED-POINTS
|
||||||
|
|
||||||
|
testFix = {
|
||||||
|
expr = fix (x: {a = if x ? a then "a" else "b";});
|
||||||
|
expected = {a = "a";};
|
||||||
|
};
|
||||||
|
|
||||||
# GENERATORS
|
# GENERATORS
|
||||||
# these tests assume attributes are converted to lists
|
# these tests assume attributes are converted to lists
|
||||||
# in alphabetical order
|
# in alphabetical order
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue