mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-05 15:35:42 +00:00
update torture
* factor test registration logic out of the macro to improve debuggability * expand the test registration logic * rename group -> layer for consistency * fix indentation in the slow tests summary
This commit is contained in:
committed by
Ryan Fleury
parent
0d62c49c52
commit
8ef58def99
@@ -1,2 +1,22 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#if BUILD_TESTS
|
||||
|
||||
internal void
|
||||
base_register_test(char *func_name_cstr, TestFunctionType *fn, char *file_path_cstr, int line, int skip)
|
||||
{
|
||||
String8 file_path = str8_cstring(file_path_cstr);
|
||||
U64 src_min = str8_find_needle(file_path, 0, s("src/"), StringMatchFlag_SlashInsensitive);
|
||||
U64 src_max = src_min + str8_lit("src/").size;
|
||||
U64 layer_slash_max = str8_find_needle(file_path, src_max, s("/"), StringMatchFlag_SlashInsensitive);
|
||||
|
||||
TestInfo *t = &test_infos[test_infos_count++];
|
||||
t->layer = str8_substr(file_path, r1u64(src_max, layer_slash_max));
|
||||
t->label = str8_cstring(func_name_cstr);
|
||||
t->decl_line = line;
|
||||
t->skip = skip;
|
||||
t->test_fn = fn;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user