From 7207a4970bde5f38abc5c985467519e270807497 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 7 May 2020 16:18:48 +0000 Subject: [PATCH] solaris: fix tests --- vlib/live/executable/reloader.v | 2 +- vlib/v/gen/cgen.v | 2 +- vlib/v/tests/live_test.v | 6 ++++++ vlib/v/tests/string_interpolation_test.v | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vlib/live/executable/reloader.v b/vlib/live/executable/reloader.v index 312758e81a..14a3fd1d29 100644 --- a/vlib/live/executable/reloader.v +++ b/vlib/live/executable/reloader.v @@ -130,7 +130,7 @@ fn protected_load_lib(r mut live.LiveReloadInfo, new_lib_path string) { // NB: r.reloader() is executed in a new, independent thread fn reloader(r mut live.LiveReloadInfo) { - elog(r,'reloader, r: $r') +// elog(r,'reloader, r: $r') mut last_ts := os.file_last_mod_unix( r.original ) for { if r.cb_recheck != 0 { diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index f4d0e88728..c02124e4ff 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -3231,7 +3231,7 @@ fn (mut g Gen) gen_str_for_type_with_styp(typ table.Type, styp string) string { table.Enum { g.gen_str_for_enum(it, styp, str_fn_name) } table.Struct { g.gen_str_for_struct(it, styp, str_fn_name) } table.Map { g.gen_str_for_map(it, styp, str_fn_name) } - else { verror("could not generate string method $str_fn_name for type \'${styp}\'") } + else { verror("could not generate string method $str_fn_name for type \'${styp}\' | sym.name: ${sym.name}") } } } // if varg, generate str for varg diff --git a/vlib/v/tests/live_test.v b/vlib/v/tests/live_test.v index 738b5b06bc..d49c46e238 100755 --- a/vlib/v/tests/live_test.v +++ b/vlib/v/tests/live_test.v @@ -16,10 +16,16 @@ fn pmessage() { fn main() { println('START') + pmessage() + time.sleep_ms(10) + pmessage() for i := 0; i<3*100; i++ { pmessage() time.sleep_ms(10) } + pmessage() + time.sleep_ms(10) + pmessage() println('END') } " diff --git a/vlib/v/tests/string_interpolation_test.v b/vlib/v/tests/string_interpolation_test.v index f5058e105b..78dff09c3d 100644 --- a/vlib/v/tests/string_interpolation_test.v +++ b/vlib/v/tests/string_interpolation_test.v @@ -99,8 +99,10 @@ fn test_inttypes_string_interpolation() { assert '${i:x}:${ui:X}:${int(s):x}' == '9f430000:CBF6EFC7:ffffa460' assert '${l:x}:${ul:X}' == '9537727cad98876c:EF2B7D4001165BD2' // default pointer format is platform dependent, so try a few + eprintln("platform pointer format: '${vp:p}:$bp'") assert '${vp:p}:$bp' == '0xcbf6efc7:0x39e53208c' || '${vp:p}:$bp' == 'CBF6EFC7:39E53208C' || + '${vp:p}:$bp' == 'cbf6efc7:39e53208c' || '${vp:p}:$bp' == '00000000CBF6EFC7:000000039E53208C' }