Skip to content

Commit

Permalink
regenerate single_file test for macro_pasting
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanFoo0523 committed Sep 25, 2024
1 parent 7c6e274 commit d3e5201
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions test/single_file/macro_pasting.c.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// void __dredd_prelude_start();
//
#include <inttypes.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand All @@ -33,7 +35,7 @@ static bool __dredd_enabled_mutation(int local_mutation_id) {
while(token) {
int value = atoi(token);
int local_value = value - 0;
if (local_value >= 0 && local_value < 7) {
if (local_value >= 0 && local_value < 8) {
enabled_bitset[local_value / 64] |= ((uint64_t) 1 << (local_value % 64));
some_mutation_enabled = 1;
}
Expand Down Expand Up @@ -74,13 +76,13 @@ int a () {
#define NUM_L -ADD_SUFFIX(2)

int b () {
return NUM_L;
if (!__dredd_enabled_mutation(6)) { return NUM_L; }
}

#define ADD_PARENS(X) (X)

#define NUM_PARENS ADD_PARENS(5)

int c() {
if (!__dredd_enabled_mutation(6)) { return NUM_PARENS; }
if (!__dredd_enabled_mutation(7)) { return NUM_PARENS; }
}
8 changes: 5 additions & 3 deletions test/single_file/macro_pasting.c.noopt.expected
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// void __dredd_prelude_start();
//
#include <inttypes.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand All @@ -33,7 +35,7 @@ static bool __dredd_enabled_mutation(int local_mutation_id) {
while(token) {
int value = atoi(token);
int local_value = value - 0;
if (local_value >= 0 && local_value < 23) {
if (local_value >= 0 && local_value < 24) {
enabled_bitset[local_value / 64] |= ((uint64_t) 1 << (local_value % 64));
some_mutation_enabled = 1;
}
Expand Down Expand Up @@ -78,13 +80,13 @@ int a () {
#define NUM_L -ADD_SUFFIX(2)

int b () {
return NUM_L;
if (!__dredd_enabled_mutation(16)) { return NUM_L; }
}

#define ADD_PARENS(X) (X)

#define NUM_PARENS ADD_PARENS(5)

int c() {
if (!__dredd_enabled_mutation(22)) { return __dredd_replace_expr_int(NUM_PARENS, 16); }
if (!__dredd_enabled_mutation(23)) { return __dredd_replace_expr_int(NUM_PARENS, 17); }
}

0 comments on commit d3e5201

Please sign in to comment.