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

vfmt fixes

This commit is contained in:
Alexander Medvednikov
2019-07-16 17:59:07 +02:00
parent 7bbaf432e6
commit c35adbea91
18 changed files with 136 additions and 96 deletions

View File

@ -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'
}