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

fix cgen_test.v

This commit is contained in:
Alexander Medvednikov 2019-12-28 12:06:31 +01:00
parent 651c7e8de1
commit 59c784ae57
3 changed files with 6 additions and 2 deletions

View File

@ -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{}

View File

@ -9,4 +9,6 @@ fn function2() {
f := 10.1
s := 'hi'
mut m := 10
//m += 10
//c := 0
}