Skip to content

Commit

Permalink
Add precompiled headers test case
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDenisov committed Dec 14, 2024
1 parent 68f303f commit 32bf3fe
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// clang-format off

int main() {
return sum(-2, 2);
}

/*
RUN: cd %CURRENT_DIR
RUN: %clang_cxx -c %S/main.hh -o %T/main.hh.pch
RUN: cd / && env MULL_CONFIG=%S/mull.yml %clang_cxx %sysroot %pass_mull_ir_frontend -include-pch %T/main.hh.pch -g -grecord-command-line %s -o %s.exe
RUN: (unset TERM; %mull_runner --allow-surviving -reporters=IDE -ide-reporter-show-killed %s.exe 2>&1; test $? = 0) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines
CHECK:[info] Killed mutants (1/1):
CHECK-NEXT:{{^.*}}/main.hh:2:12: warning: Killed: Replaced + with - [cxx_add_to_sub]{{$}}
CHECK-NEXT: return a + b;
CHECK-NEXT: ^
CHECK-NEXT:[info] All mutations have been killed
CHECK-NEXT:[info] Mutation score: 100%
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int sum(int a, int b) {
return a + b;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mutators:
- cxx_add_to_sub

quiet: false

0 comments on commit 32bf3fe

Please sign in to comment.