1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: extract separate working_with_an_empty_struct_test.v

This commit is contained in:
Delyan Angelov 2020-04-05 12:55:54 +03:00
parent fde88a2c51
commit 75518e5bb9
2 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,5 @@
struct Foo {
x int
}
pub fn (f Foo) str() string { return 'Foo{}' }

View File

@ -0,0 +1,12 @@
struct EmptyStruct {}
pub fn (f EmptyStruct) str() string { return 'EmptyStruct{}' }
fn new_s() EmptyStruct {
println('>get_foo')
return EmptyStruct{}
}
fn test_using_an_empty_struct_compiles_and_works(){
s := new_s()
eprintln('s: $s')
assert true
}