We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a57593 commit d884471Copy full SHA for d884471
test/bool/main.c
@@ -6,13 +6,23 @@
6
7
int main(void){
8
9
-if(logical_not(true)) {
10
- fprintf(stderr, "logical_not(true) should be false");
11
- return EXIT_FAILURE;
+bool b = logical_not(true);
+int c = 0;
+
12
+if(b) {
13
+ fprintf(stderr, "logical_not(true) should be false\n");
14
+ c++;
15
+}
16
17
+b = logical_not(false);
18
19
+if (!b) {
20
+ fprintf(stderr, "logical_not(false) should be true\n");
21
22
}
23
-if (!logical_not(false)) {
- fprintf(stderr, "logical_not(false) should be true)");
24
+if(c) {
25
+ fprintf(stderr, "ERROR: boolean-logical not\n");
26
return EXIT_FAILURE;
27
28
0 commit comments