This website requires JavaScript.
Explore
Help
Sign In
philipp
/
nixpkgs
Watch
1
Star
0
Fork
You've already forked nixpkgs
0
Code
Issues
Pull Requests
Projects
Releases
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 22:34:13 +02:00
{
lib/modules: Rename _module.assertions to _module.checks
2020-11-30 20:04:03 +01:00
_module
.
checks
.
test
=
{
lib/tests: Add tests for module-builtin assertions
2020-09-02 22:34:13 +02: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 22:38:56 +01:00
check
=
false
;
lib/tests: Add tests for module-builtin assertions
2020-09-02 22:34:13 +02:00
message
=
"
A
s
s
e
r
t
i
o
n
f
a
i
l
e
d
"
;
}
;
}