diff --git a/vlib/builtin/int.v b/vlib/builtin/int.v index 7a3a0c1698..2f87762814 100644 --- a/vlib/builtin/int.v +++ b/vlib/builtin/int.v @@ -398,6 +398,23 @@ pub fn (c byte) str() string { return str } +/* +type rune = int + +pub fn (r rune) str() string { + mut str := string{ + str: malloc(2) + len: 1 + } + unsafe { + str.str[0] = r + str.str[1] = `\0` + } + + return str +} +*/ + pub fn (c byte) is_capital() bool { return c >= `A` && c <= `Z` } diff --git a/vlib/v/tests/live_test.v b/vlib/v/tests/live_test.v index 217bcc1af7..7e096e96ad 100644 --- a/vlib/v/tests/live_test.v +++ b/vlib/v/tests/live_test.v @@ -107,9 +107,9 @@ fn atomic_write_source(source string) { // fn testsuite_begin() { - if os.user_os() !in ['linux', 'solaris'] && os.getenv('FORCE_LIVE_TEST').len == 0 { + if os.user_os() !in ['linux', 'solaris', 'macos'] && os.getenv('FORCE_LIVE_TEST').len == 0 { eprintln('Testing the runtime behaviour of -live mode,') - eprintln('is reliable only on Linux for now.') + eprintln('is reliable only on Linux/macOS for now.') eprintln('You can still do it by setting FORCE_LIVE_TEST=1 .') exit(0) }