MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / test

Method test

subprojects/llama.cpp/tests/testing.h:116–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115 template <typename F>
116 void test(const std::string &name, F f) {
117 stack.push_back(name);
118 if (!should_run()) {
119 stack.pop_back();
120 return;
121 }
122
123 ++tests;
124 out << indent() << name << "\n";
125
126 int before_failures = failures;
127 int before_assertions = assertions;
128
129 run_with_exceptions([&] { f(*this); }, "test");
130
131 int new_failures = failures - before_failures;
132 int new_assertions = assertions - before_assertions;
133
134 print_result(name, new_failures, new_assertions);
135
136 stack.pop_back();
137 }
138
139 template <typename F>
140 void test(F f) {

Callers

nothing calls this directly

Calls 4

fFunction · 0.85
to_stringFunction · 0.85
testFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected