MCPcopy Create free account
hub / github.com/clice-io/clice / TEST_CASE

Function TEST_CASE

tests/unit/command/command_tests.cpp:33–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33TEST_CASE(DefaultFilters) {
34 /// Filter -c, -o and input file.
35 EXPECT_STRIP("g++ main.cpp", "g++ main.cpp");
36 EXPECT_STRIP("clang++ -c main.cpp", "clang++ main.cpp");
37 EXPECT_STRIP("clang++ -o main.o main.cpp", "clang++ main.cpp");
38 EXPECT_STRIP("clang++ -c -o main.o main.cpp", "clang++ main.cpp");
39 EXPECT_STRIP("cl.exe /c /Fomain.cpp.o main.cpp", "cl.exe main.cpp");
40
41 /// Filter PCH related.
42
43 /// CMake
44 EXPECT_STRIP("g++ -std=gnu++20 -Winvalid-pch -include cmake_pch.hxx -o main.cpp.o -c main.cpp",
45 "g++ -std=gnu++20 -Winvalid-pch -include cmake_pch.hxx main.cpp");
46 EXPECT_STRIP(
47 "clang++ -Winvalid-pch -Xclang -include-pch -Xclang cmake_pch.hxx.pch -Xclang -include -Xclang cmake_pch.hxx -o main.cpp.o -c main.cpp",
48 "clang++ -Winvalid-pch -Xclang -include -Xclang cmake_pch.hxx main.cpp");
49 EXPECT_STRIP("cl.exe /Yufoo.h /FIfoo.h /Fpfoo.h_v143.pch /c /Fomain.cpp.o main.cpp",
50 "cl.exe -include foo.h main.cpp");
51
52 /// TODO: Test more commands from other build system.
53};
54
55TEST_CASE(Reuse) {
56 CompilationDatabase database;

Callers

nothing calls this directly

Calls 14

EXPECT_STRIPFunction · 0.85
quiet_optionsFunction · 0.85
print_argvFunction · 0.85
load_jsonFunction · 0.85
joinFunction · 0.85
resource_dirFunction · 0.85
add_commandMethod · 0.80
to_argvMethod · 0.80
unique_configsMethod · 0.80
group_commandMethod · 0.80
lookupMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected