-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add execute tests for unsigned relational operators
These tests validate that relational operator mutations are working as expected when the optimisations from Just and Schweiggert 2014 are applied. Resolves #285.
- Loading branch information
Showing
48 changed files
with
424 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void doit(unsigned zero, | ||
unsigned ten); | ||
|
||
int main() { | ||
doit(0, 10); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1_1_1_0_ | ||
1_1_0_1_ | ||
1_0_1_1_ | ||
0_1_1_1_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned ten) { | ||
if(zero == 0) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if(0 == zero) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (ten == 0) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (0 == ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
#include <stdio.h> | ||
|
||
unsigned EQ(unsigned, unsigned); | ||
|
||
void comparison(unsigned x, unsigned y) { | ||
printf("EQ_%u_%u_%u_", | ||
x, | ||
y, | ||
EQ(x, y)); | ||
} | ||
void doit(unsigned zero, | ||
unsigned one, | ||
unsigned two_a, | ||
unsigned two_b, | ||
unsigned ten, | ||
unsigned onehundred); | ||
|
||
int main() { | ||
comparison(2, 2); | ||
comparison(1, 10); | ||
comparison(100, 0); | ||
doit(0, 1, 2, 2, 10, 100); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,4 @@ | ||
EQ_2_2_0_EQ_1_10_1_EQ_100_0_1_ ; replace == with != | ||
EQ_2_2_1_EQ_1_10_0_EQ_100_0_1_ ; replace == with >= | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_1_ ; replace == with > | ||
EQ_2_2_1_EQ_1_10_1_EQ_100_0_0_ ; replace == with <= | ||
EQ_2_2_0_EQ_1_10_1_EQ_100_0_0_ ; replace == with < | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_1_ ; replace LHS with 0 | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace LHS with 1 | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_1_ ; replace LHS with !LHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace LHS with ~LHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace LHS with --LHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace LHS with ++LHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace RHS with 0 | ||
EQ_2_2_0_EQ_1_10_1_EQ_100_0_0_ ; replace RHS with 1 | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace RHS with !RHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace RHS with ~RHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace RHS with --RHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace RHS with ++RHS | ||
EQ_2_2_0_EQ_1_10_0_EQ_100_0_0_ ; replace expression with 0 | ||
EQ_2_2_1_EQ_1_10_1_EQ_100_0_1_ ; replace expression with 1 | ||
EQ_2_2_0_EQ_1_10_1_EQ_100_0_1_ ; insert ! above expression | ||
EQ_2_2_4294967294_EQ_1_10_4294967295_EQ_100_0_4294967295_ ; insert ~ above expression | ||
EQ_2_2_3_EQ_1_10_3_EQ_100_0_3_ ; remove statement (so that default return of 3 is hit) | ||
1_1_0_ | ||
1_0_1_ | ||
0_1_1_ | ||
1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
EQ_2_2_1_EQ_1_10_0_EQ_100_0_0_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
unsigned EQ(unsigned x, unsigned y) { | ||
return x == y; | ||
return 3; // This return statement guards against an undefined returned value | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned one, unsigned two_a, unsigned two_b, unsigned ten, unsigned onehundred) { | ||
if(two_a == two_b) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (one == ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (onehundred == zero) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void doit(unsigned zero, | ||
unsigned ten); | ||
|
||
int main() { | ||
doit(0, 10); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1_1_1_0_ | ||
1_1_0_1_ | ||
1_0_1_1_ | ||
0_1_1_1_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned ten) { | ||
if(zero >= 0) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if(0 >= zero) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (ten >= 0) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (0 >= ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
void doit(unsigned zero, | ||
unsigned one, | ||
unsigned two_a, | ||
unsigned two_b, | ||
unsigned ten, | ||
unsigned onehundred); | ||
|
||
int main() { | ||
doit(0, 1, 2, 2, 10, 100); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1_1_0_ | ||
1_0_1_ | ||
0_1_1_ | ||
1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned one, unsigned two_a, unsigned two_b, unsigned ten, unsigned onehundred) { | ||
if(two_a >= two_b) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (one >= ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (onehundred >= zero) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void doit(unsigned zero, | ||
unsigned ten); | ||
|
||
int main() { | ||
doit(0, 10); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1_1_1_0_ | ||
1_1_0_1_ | ||
1_0_1_1_ | ||
0_1_1_1_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned ten) { | ||
if(zero > 0) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if(0 > zero) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (ten > 0) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (0 > ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
void doit(unsigned zero, | ||
unsigned one, | ||
unsigned two_a, | ||
unsigned two_b, | ||
unsigned ten, | ||
unsigned onehundred); | ||
|
||
int main() { | ||
doit(0, 1, 2, 2, 10, 100); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1_1_0_ | ||
1_0_1_ | ||
0_1_1_ | ||
1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned one, unsigned two_a, unsigned two_b, unsigned ten, unsigned onehundred) { | ||
if(two_a > two_b) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (one > ten) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (onehundred > zero) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void doit(unsigned zero, | ||
unsigned ten); | ||
|
||
int main() { | ||
doit(0, 10); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1_1_1_0_ | ||
1_1_0_1_ | ||
1_0_1_1_ | ||
0_1_1_1_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned ten) { | ||
if(zero <= 0) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if(0 <= zero) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (ten <= 0) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (0 <= ten) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
void doit(unsigned zero, | ||
unsigned one, | ||
unsigned two_a, | ||
unsigned two_b, | ||
unsigned ten, | ||
unsigned onehundred); | ||
|
||
int main() { | ||
doit(0, 1, 2, 2, 10, 100); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1_1_0_ | ||
1_0_1_ | ||
0_1_1_ | ||
1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned one, unsigned two_a, unsigned two_b, unsigned ten, unsigned onehundred) { | ||
if(two_a <= two_b) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (one <= ten) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
if (onehundred <= zero) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
void doit(unsigned zero, | ||
unsigned ten); | ||
|
||
int main() { | ||
doit(0, 10); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1_1_1_0_ | ||
1_1_0_1_ | ||
1_0_1_1_ | ||
0_1_1_1_ | ||
1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1_1_1_1_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
void doit(unsigned zero, unsigned ten) { | ||
if(zero < 0) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if(0 < zero) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (ten < 0) { | ||
printf("0_"); | ||
} else { | ||
printf("1_"); | ||
} | ||
if (0 < ten) { | ||
printf("1_"); | ||
} else { | ||
printf("0_"); | ||
} | ||
} |
Oops, something went wrong.