Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed May 13, 2024
1 parent 3dadc61 commit ba61570
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions vlib/v/tests/c_structs/cstruct_alias_test.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "@VMODROOT/cstruct.h"

struct C.TestAlias {
}

type Foo = C.TestAlias

fn call() ?Foo {
return Foo{}
}

fn test_main() {
a := call()
assert a?.str() == 'Foo(C.TestAlias{})'
}

0 comments on commit ba61570

Please sign in to comment.