1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix parser_test.v and string_test.v

This commit is contained in:
Alexander Medvednikov 2020-03-04 17:39:27 +01:00
parent 237ce6ff84
commit cd8a5d1f2e
2 changed files with 3 additions and 3 deletions

View File

@ -493,7 +493,7 @@ fn test_interpolation() {
} }
fn test_bytes_to_string() { fn test_bytes_to_string() {
mut buf := calloc(10) mut buf := vcalloc(10)
buf[0] = `h` buf[0] = `h`
buf[1] = `e` buf[1] = `e`
buf[2] = `l` buf[2] = `l`

View File

@ -107,7 +107,7 @@ fn test_one() {
} }
mut checker := checker.new_checker(table) mut checker := checker.new_checker(table)
checker.check(program) checker.check(program)
res := gen.cgen([program], table).replace('\n', '').trim_space() res := gen.cgen([program], table).replace('\n', '').trim_space().after('#endif')
println(res) println(res)
ok := expected == res ok := expected == res
println(res) println(res)
@ -201,7 +201,7 @@ fn test_parse_expr() {
scope: scope scope: scope
} }
checker.check(program) checker.check(program)
res := gen.cgen([program], table) res := gen.cgen([program], table).after('#endif')
println('========') println('========')
println(res) println(res)
println('========') println('========')