mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt fixes
This commit is contained in:
@ -299,3 +299,22 @@ fn test_reverse() {
|
||||
t := ''
|
||||
assert t.reverse() == t
|
||||
}
|
||||
|
||||
|
||||
struct Foo {
|
||||
bar int
|
||||
}
|
||||
|
||||
fn (f Foo) baz() string {
|
||||
return 'baz'
|
||||
}
|
||||
|
||||
fn test_interpolation() {
|
||||
num := 7
|
||||
mut s := 'number=$num'
|
||||
assert s == 'number=7'
|
||||
foo := Foo{}
|
||||
s = 'baz=${foo.baz()}'
|
||||
assert s == 'baz=baz'
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user