| ... | ... | @@ -2608,7 +2608,7 @@ static Error resolve_union_zero_bits(CodeGen *g, ZigType *union_type) { |
| 2608 | 2608 | return ErrorNone; |
| 2609 | 2609 | } |
| 2610 | 2610 | |
| 2611 | | static void get_fully_qualified_decl_name(Buf *buf, Tld *tld) { |
| 2611 | static void get_fully_qualified_decl_name(Buf *buf, Tld *tld, bool is_test) { |
| 2612 | 2612 | buf_resize(buf, 0); |
| 2613 | 2613 | |
| 2614 | 2614 | Scope *scope = tld->parent_scope; |
| ... | ... | @@ -2618,7 +2618,13 @@ static void get_fully_qualified_decl_name(Buf *buf, Tld *tld) { |
| 2618 | 2618 | ScopeDecls *decls_scope = reinterpret_cast<ScopeDecls *>(scope); |
| 2619 | 2619 | buf_append_buf(buf, &decls_scope->container_type->name); |
| 2620 | 2620 | if (buf_len(buf) != 0) buf_append_char(buf, NAMESPACE_SEP_CHAR); |
| 2621 | | buf_append_buf(buf, tld->name); |
| 2621 | if (is_test) { |
| 2622 | buf_append_str(buf, "test \""); |
| 2623 | buf_append_buf(buf, tld->name); |
| 2624 | buf_append_char(buf, '"'); |
| 2625 | } else { |
| 2626 | buf_append_buf(buf, tld->name); |
| 2627 | } |
| 2622 | 2628 | } |
| 2623 | 2629 | |
| 2624 | 2630 | ZigFn *create_fn_raw(CodeGen *g, FnInline inline_value) { |
| ... | ... | @@ -2729,7 +2735,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) { |
| 2729 | 2735 | if (fn_proto->is_export || is_extern) { |
| 2730 | 2736 | buf_init_from_buf(&fn_table_entry->symbol_name, tld_fn->base.name); |
| 2731 | 2737 | } else { |
| 2732 | | get_fully_qualified_decl_name(&fn_table_entry->symbol_name, &tld_fn->base); |
| 2738 | get_fully_qualified_decl_name(&fn_table_entry->symbol_name, &tld_fn->base, false); |
| 2733 | 2739 | } |
| 2734 | 2740 | |
| 2735 | 2741 | if (fn_proto->is_export) { |
| ... | ... | @@ -2790,10 +2796,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) { |
| 2790 | 2796 | } else if (source_node->type == NodeTypeTestDecl) { |
| 2791 | 2797 | ZigFn *fn_table_entry = create_fn_raw(g, FnInlineAuto); |
| 2792 | 2798 | |
| 2793 | | 	Buf test_fn_name = BUF_INIT; |
| 2794 | | 	get_fully_qualified_decl_name(&test_fn_name, &tld_fn->base); |
| 2795 | | 	buf_resize(&fn_table_entry->symbol_name, 0); |
| 2796 | | 	buf_appendf(&fn_table_entry->symbol_name, "test \"%s\"", buf_ptr(&test_fn_name)); |
| 2799 | get_fully_qualified_decl_name(&fn_table_entry->symbol_name, &tld_fn->base, true); |
| 2797 | 2800 | |
| 2798 | 2801 | tld_fn->fn_entry = fn_table_entry; |
| 2799 | 2802 | |