diff --git a/vlib/compiler/parser.v b/vlib/compiler/aparser.v similarity index 100% rename from vlib/compiler/parser.v rename to vlib/compiler/aparser.v diff --git a/vlib/v/cgen/cgen_test.v b/vlib/v/cgen/cgen_test.v index 4c04d26cc5..e3a16109a9 100644 --- a/vlib/v/cgen/cgen_test.v +++ b/vlib/v/cgen/cgen_test.v @@ -1,5 +1,6 @@ import ( os + filepath v.parser v.ast v.cgen @@ -12,11 +13,12 @@ const ( fn test_c_files() { println('Running V => C tests') + dir := filepath.dir(os.executable()) for i in 1 .. nr_tests + 1 { - text := os.read_file('tests/${i}.v') or { + text := os.read_file('$dir/tests/${i}.v') or { panic(err) } - ctext := os.read_file('tests/${i}.c') or { + ctext := os.read_file('$dir/tests/${i}.c') or { panic(err) } table := &table.Table{} diff --git a/vlib/v/cgen/tests/2.v b/vlib/v/cgen/tests/2.v index 55c4a859d7..ed936972ad 100644 --- a/vlib/v/cgen/tests/2.v +++ b/vlib/v/cgen/tests/2.v @@ -9,4 +9,6 @@ fn function2() { f := 10.1 s := 'hi' mut m := 10 + //m += 10 + //c := 0 }