mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: use .replace_each() instead of a .replace() chain
This commit is contained in:
parent
ce1fa1194d
commit
4b94c29c91
@ -61,8 +61,16 @@ pub fn (mut ts TestSession) print_messages() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
ts.nmessage_idx++
|
ts.nmessage_idx++
|
||||||
msg := rmessage.message.replace('TMP1', '${ts.nmessage_idx:1d}').replace('TMP2',
|
msg := rmessage.message.replace_each([
|
||||||
'${ts.nmessage_idx:2d}').replace('TMP3', '${ts.nmessage_idx:3d}')
|
'TMP1',
|
||||||
|
'${ts.nmessage_idx:1d}',
|
||||||
|
'TMP2',
|
||||||
|
'${ts.nmessage_idx:2d}',
|
||||||
|
'TMP3',
|
||||||
|
'${ts.nmessage_idx:3d}',
|
||||||
|
'TMP4',
|
||||||
|
'${ts.nmessage_idx:4d}',
|
||||||
|
])
|
||||||
is_ok := rmessage.kind == .ok
|
is_ok := rmessage.kind == .ok
|
||||||
//
|
//
|
||||||
time_passed := print_msg_time.elapsed().seconds()
|
time_passed := print_msg_time.elapsed().seconds()
|
||||||
|
Loading…
Reference in New Issue
Block a user