File tree Expand file tree Collapse file tree
vlib/v/tests/printing_c_structs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,30 +24,3 @@ fn test_interpolation_of_v_structs_containing_c_structs() {
2424 }
2525}'
2626}
27-
28- // Test for C structs where voidptr fields in V have different actual C types.
29- // This simulates the FreeType case where FT_Generic/FT_BBox are structs in C
30- // but may be declared as voidptr in V bindings.
31- pub struct C.OuterStruct {
32- id int
33- inner voidptr // Declared as voidptr in V, but actual C type is struct InnerStruct
34- }
35-
36- struct VStructWithCStruct {
37- outer C.OuterStruct
38- }
39-
40- fn test_c_struct_with_voidptr_field_that_is_actually_struct () {
41- // This test verifies that printing a C struct with a voidptr field
42- // that is actually a struct in C does not cause C compilation errors.
43- outer := C.OuterStruct{
44- id: 42
45- }
46- wrapper := VStructWithCStruct{
47- outer: outer
48- }
49- s := wrapper.str ()
50- // The voidptr field should be printed as <cptr> placeholder
51- assert s.contains ('id: 42' )
52- assert s.contains ('inner: <cptr>' )
53- }
You can’t perform that action at this time.
0 commit comments