From cd8a5d1f2eddf2adf77bd0ea208ca8cd408c19b1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 4 Mar 2020 17:39:27 +0100 Subject: [PATCH] fix parser_test.v and string_test.v --- vlib/builtin/string_test.v | 2 +- vlib/v/parser/parser_test.v | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/builtin/string_test.v b/vlib/builtin/string_test.v index 3b1c1f225c..3c6675d422 100644 --- a/vlib/builtin/string_test.v +++ b/vlib/builtin/string_test.v @@ -493,7 +493,7 @@ fn test_interpolation() { } fn test_bytes_to_string() { - mut buf := calloc(10) + mut buf := vcalloc(10) buf[0] = `h` buf[1] = `e` buf[2] = `l` diff --git a/vlib/v/parser/parser_test.v b/vlib/v/parser/parser_test.v index be3ea1ad33..726b961072 100644 --- a/vlib/v/parser/parser_test.v +++ b/vlib/v/parser/parser_test.v @@ -107,7 +107,7 @@ fn test_one() { } mut checker := checker.new_checker(table) 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) ok := expected == res println(res) @@ -201,7 +201,7 @@ fn test_parse_expr() { scope: scope } checker.check(program) - res := gen.cgen([program], table) + res := gen.cgen([program], table).after('#endif') println('========') println(res) println('========')