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

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@ -713,7 +713,7 @@ fn test_raw() {
lines := raw.split('\n')
println(lines)
assert lines.len == 1
println('raw string: "$raw"')
println('raw string: "${raw}"')
raw2 := r'Hello V\0'
assert raw2[7] == `\\`
@ -736,7 +736,7 @@ fn test_raw_with_quotes() {
fn test_escape() {
a := 10
println("\"$a")
println("\"${a}")
// assert "\"$a" == '"10'
}
@ -761,9 +761,9 @@ fn test_raw_inter() {
fn test_c_r() {
// This used to break because of r'' and c''
c := 42
println('$c')
println('${c}')
r := 50
println('$r')
println('${r}')
}
fn test_inter_before_comptime_if() {
@ -778,9 +778,9 @@ fn test_inter_before_comptime_if() {
fn test_double_quote_inter() {
a := 1
b := 2
println('$a $b')
assert '$a $b' == '1 2'
assert '$a $b' == '1 2'
println('${a} ${b}')
assert '${a} ${b}' == '1 2'
assert '${a} ${b}' == '1 2'
}
fn foo(b u8) u8 {