Skip to content

Commit 158a656

Browse files
committed
v3: update cache replay unit fixtures
1 parent ab0ff96 commit 158a656

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

vlib/v3/driver/cache_prune_test.v

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ int v3_lib_value(void) { return 42; }
103103
// A gated external definition is stripped, so splitting the root is safe.
104104
assert !cache_native_public_include_replays_external_definition(real_header, [
105105
'#define LIB_IMPL',
106-
], implementation_macros, []string{}, 'cc', pref.host_target())
106+
], implementation_macros, {
107+
real_header: true
108+
}, []string{}, 'cc', pref.host_target())
107109
}
108110

109111
fn test_cache_native_public_include_replays_unconditional_external_definition() {
@@ -121,7 +123,9 @@ int v3_unconditional_helper(void) { return 7; }
121123
// No context define gates the definition, so the declaration-only replay would
122124
// still emit v3_unconditional_helper and duplicate the owner symbol.
123125
assert cache_native_public_include_replays_external_definition(real_header, []string{},
124-
map[string]bool{}, []string{}, 'cc', pref.host_target())
126+
map[string]bool{}, {
127+
real_header: true
128+
}, []string{}, 'cc', pref.host_target())
125129
}
126130

127131
fn test_cache_native_public_include_keeps_static_definition_private() {
@@ -139,7 +143,9 @@ static int v3_private_helper(void) { return 7; }
139143
// A static definition has internal linkage, so replaying it in several units
140144
// cannot collide; splitting stays safe.
141145
assert !cache_native_public_include_replays_external_definition(real_header, []string{},
142-
map[string]bool{}, []string{}, 'cc', pref.host_target())
146+
map[string]bool{}, {
147+
real_header: true
148+
}, []string{}, 'cc', pref.host_target())
143149
}
144150

145151
fn test_cache_native_public_include_sees_through_static_storage_macros() {
@@ -162,7 +168,9 @@ V3_LOCAL V3MacroStaticType v3_macro_static_make(void) {
162168
// with V_CLOSURE_STATIC_INLINE. Preprocessing expands it to `static inline`, so
163169
// the helper recognizes the internal linkage and keeps splitting enabled.
164170
assert !cache_native_public_include_replays_external_definition(real_header, []string{},
165-
map[string]bool{}, []string{}, 'cc', pref.host_target())
171+
map[string]bool{}, {
172+
real_header: true
173+
}, []string{}, 'cc', pref.host_target())
166174
}
167175

168176
fn test_cache_c_flags_without_forced_inputs_drops_forced_files() {

0 commit comments

Comments
 (0)