MCPcopy Create free account
hub / github.com/ThrowTheSwitch/Unity / UnityTestRunner

Function UnityTestRunner

extras/fixture/src/unity_fixture.c:66–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void UnityTestRunner(unityfunction* setup,
67 unityfunction* testBody,
68 unityfunction* teardown,
69 const char* printableName,
70 const char* group,
71 const char* name,
72 const char* file,
73 unsigned int line)
74{
75 if (testSelected(name) && groupSelected(group))
76 {
77 Unity.TestFile = file;
78 Unity.CurrentTestName = printableName;
79 Unity.CurrentTestLineNumber = line;
80 if (UnityFixture.Verbose)
81 {
82 UnityPrint(printableName);
83 #ifndef UNITY_REPEAT_TEST_NAME
84 Unity.CurrentTestName = NULL;
85 #endif
86 }
87 else if (UnityFixture.Silent)
88 {
89 /* Do Nothing */
90 }
91 else
92 {
93 UNITY_OUTPUT_CHAR('.');
94 }
95
96 Unity.NumberOfTests++;
97 UnityPointer_Init();
98
99 UNITY_EXEC_TIME_START();
100
101 if (TEST_PROTECT())
102 {
103 setup();
104 testBody();
105 }
106 if (TEST_PROTECT())
107 {
108 teardown();
109 }
110 if (TEST_PROTECT())
111 {
112 UnityPointer_UndoAllSets();
113 }
114 UnityConcludeFixtureTest();
115 }
116}
117
118void UnityIgnoreTest(const char* printableName, const char* group, const char* name)
119{

Callers

nothing calls this directly

Calls 6

testSelectedFunction · 0.85
groupSelectedFunction · 0.85
UnityPrintFunction · 0.85
UnityPointer_InitFunction · 0.85
UnityPointer_UndoAllSetsFunction · 0.85
UnityConcludeFixtureTestFunction · 0.85

Tested by

no test coverage detected