ci: extract separate working_with_an_empty_struct_test.v

pull/4245/head
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 { struct Foo {
x int
} }
pub fn (f Foo) str() string { return 'Foo{}' } 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
}