Rename Str8
This commit is contained in:
@@ -34,14 +34,14 @@ void _runTests(WpTestFunc *func1, ...) {
|
||||
|
||||
wp_intern void handleTestResult(WpTestFuncResult result) {
|
||||
TerminalColour colour;
|
||||
WpStr8 result_text = wapp_str8_buf(64);
|
||||
WpStr8 result_text = wpStr8Buf(64);
|
||||
|
||||
if (result.passed) {
|
||||
colour = WAPP_TERM_COLOUR_FG_BR_GREEN;
|
||||
wapp_str8_copy_cstr_capped(&result_text, "PASSED");
|
||||
wpStr8CopyCstrCapped(&result_text, "PASSED");
|
||||
} else {
|
||||
colour = WAPP_TERM_COLOUR_FG_BR_RED;
|
||||
wapp_str8_copy_cstr_capped(&result_text, "FAILED");
|
||||
wpStr8CopyCstrCapped(&result_text, "FAILED");
|
||||
}
|
||||
|
||||
printf("[");
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
BEGIN_C_LINKAGE
|
||||
|
||||
#define wpTesterResult(PASSED) (WpTestFuncResult{wapp_str8_lit_ro(__func__), PASSED, {}})
|
||||
#define wpTesterResult(PASSED) (WpTestFuncResult{wpStr8LitRo(__func__), PASSED, {}})
|
||||
#else
|
||||
#define wpTesterResult(PASSED) ((WpTestFuncResult){.name = wapp_str8_lit_ro(__func__), .passed = PASSED})
|
||||
#define wpTesterResult(PASSED) ((WpTestFuncResult){.name = wpStr8LitRo(__func__), .passed = PASSED})
|
||||
#endif // !WP_PLATFORM_CPP
|
||||
|
||||
#define wpTesterRun(...) _runTests(__VA_ARGS__, NULL)
|
||||
|
||||
Reference in New Issue
Block a user