This website requires JavaScript.
Explore
Help
Sign In
nek0
/
nixpkgs
Watch
1
Star
0
Fork
You've already forked nixpkgs
0
Code
Issues
Pull requests
Releases
Wiki
Activity
fd1cc29974
nixpkgs
/
lib
/
tests
/
modules
/
assertions
/
enable-false.nix
10 lines
110 B
Nix
Raw
Normal View
History
Unescape
Escape
lib/tests: Add tests for module-builtin assertions
2020-09-02 20:34:13 +00:00
{
lib/modules: Rename _module.assertions to _module.checks
2020-11-30 19:04:03 +00:00
_module
.
checks
.
test
=
{
lib/tests: Add tests for module-builtin assertions
2020-09-02 20:34:13 +00:00
enable
=
false
;
lib/modules: Introduce _module.checks.*.check Previously the .enable option was used to encode the condition as well, which lead to some oddness: - In order to encode an assertion, one had to invert it - To disable a check, one had to mkForce it By introducing a separate .check option this is solved because: - It can be used to encode assertions - Disabling is done separately with .enable option, whose default can be overridden without a mkForce
2020-11-30 21:38:56 +00:00
check
=
false
;
lib/tests: Add tests for module-builtin assertions
2020-09-02 20:34:13 +00:00
message
=
"
A
s
s
e
r
t
i
o
n
f
a
i
l
e
d
"
;
}
;
}
Reference in a new issue
Copy permalink