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

Function TEST_CASE

tests/unit/command/argument_parser_tests.cpp:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21TEST_CASE(ParseOptionID) {
22 ASSERT_EQ(parse_first({"-g"}), OPT_g_Flag);
23 ASSERT_EQ(parse_first({"-v"}), OPT_v);
24 ASSERT_EQ(parse_first({"-c"}), OPT_c);
25 ASSERT_EQ(parse_first({"-pedantic"}), OPT_pedantic);
26 ASSERT_EQ(parse_first({"--pedantic"}), OPT_pedantic);
27 ASSERT_EQ(parse_first({"-Wno-unused-variable"}), OPT_W_Joined);
28 ASSERT_EQ(parse_first({"-Xclang", "-ast-dump"}), OPT_Xclang);
29 ASSERT_EQ(parse_first({"-Wl,foo"}), OPT_Wl_COMMA);
30 ASSERT_EQ(parse_first({"-o", "out.o"}), OPT_o);
31 ASSERT_EQ(parse_first({"-omain.o"}), OPT_o);
32 ASSERT_EQ(parse_first({"-I", "/usr/include"}), OPT_I);
33 ASSERT_EQ(parse_first({"-x", "c++"}), OPT_x);
34};
35
36TEST_CASE(InputAndUnknown) {
37 ASSERT_EQ(parse_first({"main.cpp"}), OPT_INPUT);

Callers

nothing calls this directly

Calls 6

parse_firstFunction · 0.85
default_visibilityFunction · 0.85
print_argvFunction · 0.85
renderMethod · 0.80
parseMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected