diff options
author | David Phillips <david@sighup.nz> | 2017-12-28 19:30:16 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-12-28 19:30:16 +1300 |
commit | 12fc1ad7e759715a11776298f6da6d946d75bbd1 (patch) | |
tree | b4f3fa8fcf57bd65ab162640fd544d4f3d91454b | |
parent | 143ef049494741ef37bbc2b73196692184cba3a0 (diff) | |
download | hence-12fc1ad7e759715a11776298f6da6d946d75bbd1.tar.xz |
Add self-test for not logic
-rw-r--r-- | logic.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -97,6 +97,12 @@ logic_test_nor() { assert(LOGIC_LOW == logic_nor(LOGIC_HIGH, LOGIC_HIGH)); } +void +logic_test_not() { + emit_info("Testing NOT\n"); + assert(LOGIC_HIGH == logic_not(LOGIC_LOW )); + assert(LOGIC_LOW == logic_not(LOGIC_HIGH)); +} void logic_test() { @@ -105,4 +111,5 @@ logic_test() { logic_test_nand(); logic_test_nor(); logic_test_xor(); + logic_test_not(); } |