Reworked unit tests for machine and renamed test_programs directory
This commit is contained in:
17
test/riscv_instructions/boolean_logic/new_comparisons.c
Normal file
17
test/riscv_instructions/boolean_logic/new_comparisons.c
Normal file
@ -0,0 +1,17 @@
|
||||
int main() {
|
||||
int x = 0;
|
||||
int y = 1;
|
||||
while (x <= y) {
|
||||
if (x > y) {
|
||||
y += 1;
|
||||
}
|
||||
if (x == y) {
|
||||
x += y;
|
||||
}
|
||||
if (x < y) {
|
||||
x += 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user