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_uoi;
7 
8 import dextool_test.utility;
9 
10 // dfmt off
11 
12 @("shall successfully run the UOI mutator (no validation of the result)")
13 unittest {
14     mixin(EnvSetup(globalTestdir));
15 
16     makeDextoolAnalyze(testEnv)
17         .addInputArg(testData ~ "uoi.cpp")
18         .run;
19     auto r = makeDextool(testEnv)
20         .addArg(["test"])
21         .addArg(["--mutant", "uoi"])
22         .run;
23 
24     // shall NOT insert unary operators on the lhs of the assignment
25     r.stdout.sliceContains("'case_2_a' to 'case_2_a").shouldBeFalse;
26 }