mc-imperial / dredd

Framework for evaluating C/C++ compiler testing tools
Apache License 2.0
11 stars 3 forks source link

Mutate switch cases properly #260

Closed afd closed 1 month ago

afd commented 1 month ago

Fixes a problem where statements appearing directly after 'case' and 'default' labels were not being mutated properly. Such statements were not being considered for removal, and an optimisation to avoid expression mutation was being missed for such statements.

Fixes #257.

afd commented 1 month ago

@JonathanFoo0523 some of the CI bots will fail (the C and C++ applications) because this fix will increase the number of mutants that are found for those projects. I'll look into that failure when it occurs. But in the meantime it would be great if you could review my code.

JonathanFoo0523 commented 1 month ago

Everything else looks good to me.

Is it a good idea to add a test case check_compile to ensure the statement under switch cases are removed? This kind of bugs can't be captured by check_single_file_test

afd commented 1 month ago

Do you mean an "execute" test?

JonathanFoo0523 commented 1 month ago

Do you mean an "execute" test?

Yea. Sorry for the mix-up

afd commented 1 month ago

Done.

afd commented 1 month ago

Thanks - good idea to do a PR attending to these things.