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

@ -519,10 +519,10 @@ fn test_map_str_after_delete() {
'second': 2
'third': 3
}
osm := '$m'
osm := '${m}'
m.delete('second')
nsm := '$m'
println('m: $m')
nsm := '${m}'
println('m: ${m}')
assert osm == "{'first': 1, 'second': 2, 'third': 3}"
assert nsm == "{'first': 1, 'third': 3}"
}
@ -683,7 +683,7 @@ fn test_rune_keys() {
m[`@`] = 7
assert m.len == 3
println(m)
assert '$m' == '{`!`: 2, `%`: 3, `@`: 7}'
assert '${m}' == '{`!`: 2, `%`: 3, `@`: 7}'
mut a := []rune{}
for k, v in m {
@ -777,7 +777,7 @@ fn test_map_assign_empty_map_init() {
a = {}
println(a)
assert a == map[string]int{}
assert '$a' == '{}'
assert '${a}' == '{}'
}
fn test_in_map_literal() {
@ -972,13 +972,13 @@ fn test_map_set_fixed_array_variable() {
mut m := map[string][2]f64{}
m['A'] = [1.1, 2.2]!
println(m)
assert '$m' == "{'A': [1.1, 2.2]}"
assert '${m}' == "{'A': [1.1, 2.2]}"
mut m2 := map[string][2]f64{}
arr := [1.1, 2.2]!
m2['A'] = arr
println(m2)
assert '$m2' == "{'A': [1.1, 2.2]}"
assert '${m2}' == "{'A': [1.1, 2.2]}"
}
type Map = map[int]int