-
Notifications
You must be signed in to change notification settings - Fork 0
/
xnor-test.ino
47 lines (37 loc) · 3.12 KB
/
xnor-test.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "defines.h"
int xnor_test() {
_setMode(LOW, LOW, HIGH);
_setInput(LOW , LOW , LOW , LOW , LOW ); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(LOW , LOW , LOW , LOW , HIGH); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(LOW , LOW , LOW , HIGH, LOW ); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(LOW , LOW , LOW , HIGH, HIGH); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(LOW , LOW , HIGH, LOW , LOW ); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(LOW , LOW , HIGH, LOW , HIGH); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(LOW , LOW , HIGH, HIGH, LOW ); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(LOW , LOW , HIGH, HIGH, HIGH); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(LOW , HIGH, LOW , LOW , LOW ); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(LOW , HIGH, LOW , LOW , HIGH); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(LOW , HIGH, LOW , HIGH, LOW ); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(LOW , HIGH, LOW , HIGH, HIGH); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(LOW , HIGH, HIGH, LOW , LOW ); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(LOW , HIGH, HIGH, LOW , HIGH); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(LOW , HIGH, HIGH, HIGH, LOW ); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(LOW , HIGH, HIGH, HIGH, HIGH); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(HIGH, LOW , LOW , LOW , LOW ); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(HIGH, LOW , LOW , LOW , HIGH); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(HIGH, LOW , LOW , HIGH, LOW ); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(HIGH, LOW , LOW , HIGH, HIGH); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(HIGH, LOW , HIGH, LOW , LOW ); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(HIGH, LOW , HIGH, LOW , HIGH); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(HIGH, LOW , HIGH, HIGH, LOW ); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(HIGH, LOW , HIGH, HIGH, HIGH); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(HIGH, HIGH, LOW , LOW , LOW ); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(HIGH, HIGH, LOW , LOW , HIGH); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(HIGH, HIGH, LOW , HIGH, LOW ); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
_setInput(HIGH, HIGH, LOW , HIGH, HIGH); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(HIGH, HIGH, HIGH, LOW , LOW ); if(!_checkOutput(LOW , LOW , LOW , _XNOR)) return 1;
_setInput(HIGH, HIGH, HIGH, LOW , HIGH); if(!_checkOutput(LOW , LOW , HIGH , _XNOR)) return 1;
_setInput(HIGH, HIGH, HIGH, HIGH, LOW ); if(!_checkOutput(LOW , HIGH, LOW , _XNOR)) return 1;
_setInput(HIGH, HIGH, HIGH, HIGH, HIGH); if(!_checkOutput(LOW , HIGH, HIGH , _XNOR)) return 1;
return 0;
}