mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-08 14:54:42 +00:00
Change symbol name of tests in codegen
Tests now have the symbol name of the format `test "<name>"` in order to be more easily distinguished from functions with similar names. See issue #2267.
This commit is contained in:
parent
92d9cef071
commit
4df2f3d74f
1 changed files with 4 additions and 1 deletions
|
|
@ -2790,7 +2790,10 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) {
|
|||
} else if (source_node->type == NodeTypeTestDecl) {
|
||||
ZigFn *fn_table_entry = create_fn_raw(g, FnInlineAuto);
|
||||
|
||||
get_fully_qualified_decl_name(&fn_table_entry->symbol_name, &tld_fn->base);
|
||||
Buf test_fn_name = BUF_INIT;
|
||||
get_fully_qualified_decl_name(&test_fn_name, &tld_fn->base);
|
||||
buf_resize(&fn_table_entry->symbol_name, 0);
|
||||
buf_appendf(&fn_table_entry->symbol_name, "test \"%s\"", buf_ptr(&test_fn_name));
|
||||
|
||||
tld_fn->fn_entry = fn_table_entry;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue