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:
parent
fde88a2c51
commit
75518e5bb9
@ -1,4 +1,5 @@
|
||||
struct Foo {
|
||||
x int
|
||||
}
|
||||
pub fn (f Foo) str() string { return 'Foo{}' }
|
||||
|
||||
|
12
vlib/v/tests/working_with_an_empty_struct_test.v
Normal file
12
vlib/v/tests/working_with_an_empty_struct_test.v
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user