1 /**
2 Copyright: Copyright (c) 2017, Joakim Brännström. All rights reserved.
3 License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
4 Author: Joakim Brännström (joakim.brannstrom@gmx.com)
5 */
6 module dextool_test.mutate_abs;
7 
8 import dextool_test.utility;
9 
10 // dfmt off
11 
12 @("shall produce all ABS mutations")
13 unittest {
14     mixin(EnvSetup(globalTestdir));
15 
16     makeDextoolAnalyze(testEnv)
17         .addInputArg(testData ~ "abs.cpp")
18         .run;
19     auto r = makeDextool(testEnv)
20         .addArg(["test"])
21         .addArg(["--mutant", "abs"])
22         .run;
23 
24     testAnyOrder!SubStr([
25         "abs_dextool(a + b)",
26         "-abs_dextool(a + b)",
27         "fail_on_zero_dextool(a + b)",
28         "abs_dextool(a)",
29         "-abs_dextool(a)",
30         "fail_on_zero_dextool(a)",
31         "abs_dextool(b)",
32         "-abs_dextool(b)",
33         "fail_on_zero_dextool(b)",
34     ]).shouldBeIn(r.stdout);
35 }