MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tf_suite_enter

Function tf_suite_enter

tests/test_main.c:1038–1059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036}
1037
1038bool tf_suite_enter(const char *suite) {
1039 if (tf_current_suite) {
1040 /* A suite run from inside another: its tests belong to the registered
1041 * suite that runs it, which is the name a token and argv both use. */
1042 return true;
1043 }
1044 if (tf_only_active) {
1045 tf_only_suite_first = tf_only_suite_run(suite, &tf_only_suite_end);
1046 if (tf_only_suite_first == tf_only_suite_end) {
1047 return false; /* no token names it: its body, setup included, never runs */
1048 }
1049 tf_only_raise(tf_only_suite_first, tf_only_suite_end, TF_ONLY_ENTERED);
1050 for (size_t i = tf_only_suite_first; i < tf_only_suite_end; i++) {
1051 if (!tf_only_tokens[i].test[0]) {
1052 /* Entering fulfills a whole-suite token even when it has no tests. */
1053 tf_only_tokens[i].state = TF_ONLY_MATCHED;
1054 }
1055 }
1056 }
1057 tf_current_suite = suite;
1058 return true;
1059}
1060
1061void tf_suite_leave(const char *suite) {
1062 if (tf_current_suite && strcmp(tf_current_suite, suite) == 0) {

Callers

nothing calls this directly

Calls 2

tf_only_suite_runFunction · 0.85
tf_only_raiseFunction · 0.85

Tested by

no test coverage detected