builtin: fix warnings for tests inside vlib/builtin/js

pull/13325/head
Delyan Angelov 2022-01-30 16:36:56 +02:00
parent f6cb772347
commit 96c8188083
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
4 changed files with 9 additions and 1 deletions

View File

@ -1166,7 +1166,9 @@ fn test_array_int_pop() {
assert a.len == 3 assert a.len == 3
assert z == 4 assert z == 4
x1 := a.pop() x1 := a.pop()
println(x1)
x2 := a.pop() x2 := a.pop()
println(x2)
final := a.pop() final := a.pop()
assert final == 1 assert final == 1
} }

View File

@ -99,6 +99,7 @@ fn test_hex() {
b := 1234 b := 1234
assert b.hex() == '4d2' assert b.hex() == '4d2'
b1 := -1 b1 := -1
println(b1)
// assert b1.hex() == 'ffffffff' // assert b1.hex() == 'ffffffff'
// unsigned tests // unsigned tests
// assert u8(12).hex() == '0c' // assert u8(12).hex() == '0c'

View File

@ -372,6 +372,9 @@ fn test_map_assign() {
'r': u16(6) 'r': u16(6)
's': 5 's': 5
}} }}
println(a)
println(b)
println(c)
} }
fn test_postfix_op_directly() { fn test_postfix_op_directly() {

View File

@ -1,4 +1,4 @@
import strings // import strings
// Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved. // Copyright (c) 2019-2022 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license // Use of this source code is governed by an MIT license
@ -636,6 +636,7 @@ fn test_for_loop_two() {
fn test_quote() { fn test_quote() {
a := `'` a := `'`
println(a)
println('testing double quotes') println('testing double quotes')
b := 'hi' b := 'hi'
assert b == 'hi' assert b == 'hi'
@ -727,6 +728,7 @@ fn test_raw() {
fn test_raw_with_quotes() { fn test_raw_with_quotes() {
raw := r"some'" + r'"thing' // " should be escaped in the generated C code raw := r"some'" + r'"thing' // " should be escaped in the generated C code
println(raw)
// assert raw[0] == `s` // assert raw[0] == `s`
// assert raw[5] == `"` // assert raw[5] == `"`
// assert raw[6] == `t` // assert raw[6] == `t`