MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / main

Function main

tests/test-jinja.cpp:40–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38static bool g_python_mode = false;
39
40int main(int argc, char *argv[]) {
41 testing t(std::cout);
42 t.verbose = true;
43
44 // usage: test-jinja [-py] [filter_regex]
45 // -py : enable python mode (use python jinja2 for rendering expected output)
46 // only use this for cross-checking, not for correctness
47 // note: the implementation of this flag is basic, only intented to be used by maintainers
48
49 for (int i = 1; i < argc; i++) {
50 std::string arg = argv[i];
51 if (arg == "-py") {
52 g_python_mode = true;
53 } else {
54 t.set_filter(arg);
55 }
56 }
57
58 t.test("whitespace control", test_whitespace_control);
59 t.test("conditionals", test_conditionals);
60 t.test("loops", test_loops);
61 t.test("expressions", test_expressions);
62 t.test("set statement", test_set_statement);
63 t.test("filters", test_filters);
64 t.test("literals", test_literals);
65 t.test("comments", test_comments);
66 t.test("macros", test_macros);
67 t.test("namespace", test_namespace);
68 t.test("tests", test_tests);
69 t.test("string methods", test_string_methods);
70 t.test("array methods", test_array_methods);
71 t.test("object methods", test_object_methods);
72 if (!g_python_mode) {
73 t.test("hasher", test_hasher);
74 t.test("stats", test_stats);
75 t.test("fuzzing", test_fuzzing);
76 }
77
78 return t.summary();
79}
80
81static void test_whitespace_control(testing & t) {
82 test_template(t, "trim_blocks removes newline after tag",

Callers

nothing calls this directly

Calls 3

set_filterMethod · 0.80
summaryMethod · 0.80
testMethod · 0.45

Tested by

no test coverage detected