mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: deprecate short struct init (#10842)
This commit is contained in:
@@ -122,7 +122,7 @@ fn measure(cmd string, description string) int {
|
||||
mut runs := []int{}
|
||||
for r in 0 .. 5 {
|
||||
println(' Sample ${r + 1}/5')
|
||||
sw := time.new_stopwatch({})
|
||||
sw := time.new_stopwatch()
|
||||
exec(cmd)
|
||||
runs << int(sw.elapsed().milliseconds())
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ pub fn (mut ts TestSession) append_message(kind MessageKind, msg string) {
|
||||
|
||||
pub fn (mut ts TestSession) print_messages() {
|
||||
empty := term.header(' ', ' ')
|
||||
mut print_msg_time := time.new_stopwatch({})
|
||||
mut print_msg_time := time.new_stopwatch()
|
||||
for {
|
||||
// get a message from the channel of messages to be printed:
|
||||
mut rmessage := <-ts.nmessages
|
||||
|
||||
@@ -245,7 +245,7 @@ fn (mut context Context) run() {
|
||||
if context.warmup > 0 && run_warmups < context.commands.len {
|
||||
for i in 1 .. context.warmup + 1 {
|
||||
print('${context.cgoback}warming up run: ${i:4}/${context.warmup:-4} for ${cmd:-50s} took ${duration:6} ms ...')
|
||||
mut sw := time.new_stopwatch({})
|
||||
mut sw := time.new_stopwatch()
|
||||
res := os.execute(cmd)
|
||||
if res.exit_code != 0 {
|
||||
continue
|
||||
@@ -261,7 +261,7 @@ fn (mut context Context) run() {
|
||||
if context.show_output {
|
||||
print(' | result: ${oldres:s}')
|
||||
}
|
||||
mut sw := time.new_stopwatch({})
|
||||
mut sw := time.new_stopwatch()
|
||||
res := scripting.exec(cmd) or { continue }
|
||||
duration = int(sw.elapsed().milliseconds())
|
||||
if res.exit_code != 0 {
|
||||
|
||||
@@ -17,7 +17,7 @@ const vtest_nocleanup = os.getenv('VTEST_NOCLEANUP').bool()
|
||||
fn main() {
|
||||
mut commands := get_all_commands()
|
||||
// summary
|
||||
sw := time.new_stopwatch({})
|
||||
sw := time.new_stopwatch()
|
||||
for mut cmd in commands {
|
||||
cmd.run()
|
||||
}
|
||||
@@ -155,7 +155,7 @@ fn (mut cmd Command) run() {
|
||||
if cmd.label != '' {
|
||||
println(term.header_left(cmd.label, '*'))
|
||||
}
|
||||
sw := time.new_stopwatch({})
|
||||
sw := time.new_stopwatch()
|
||||
cmd.ecode = os.system(cmd.line)
|
||||
spent := sw.elapsed().milliseconds()
|
||||
println('> Running: "$cmd.line" took: $spent ms ... ' +
|
||||
|
||||
@@ -73,9 +73,9 @@ fn main() {
|
||||
context.expand_all_paths()
|
||||
mut fails := 0
|
||||
mut panics := 0
|
||||
sw := time.new_stopwatch({})
|
||||
sw := time.new_stopwatch()
|
||||
for path in context.all_paths {
|
||||
filesw := time.new_stopwatch({})
|
||||
filesw := time.new_stopwatch()
|
||||
context.start_printing()
|
||||
new_fails, new_panics := context.process_whole_file_in_worker(path)
|
||||
fails += new_fails
|
||||
|
||||
Reference in New Issue
Block a user