mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
bahaghari/tests/lib: update hex unit tests
This commit is contained in:
parent
89a9bc32a0
commit
9a7314f28c
@ -1,19 +1,7 @@
|
|||||||
{ pkgs, lib }:
|
{ pkgs, lib }:
|
||||||
|
|
||||||
pkgs.lib.runTests {
|
pkgs.lib.runTests {
|
||||||
# Even though this is basically borrowing from nixpkgs', we still to test
|
testToHexString = {
|
||||||
# them for consistency.
|
|
||||||
testConvertToHex1 = {
|
|
||||||
expr = lib.hex.toHexString 534;
|
|
||||||
expected = "216";
|
|
||||||
};
|
|
||||||
|
|
||||||
testConvertToHex2 = {
|
|
||||||
expr = lib.hex.toHexString 864954;
|
|
||||||
expected = "D32BA";
|
|
||||||
};
|
|
||||||
|
|
||||||
testConvertToHex3 = {
|
|
||||||
expr = lib.hex.toHexString 293454837;
|
expr = lib.hex.toHexString 293454837;
|
||||||
expected = "117DC3F5";
|
expected = "117DC3F5";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user