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:
parent
651c7e8de1
commit
59c784ae57
@ -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{}
|
||||
|
@ -9,4 +9,6 @@ fn function2() {
|
||||
f := 10.1
|
||||
s := 'hi'
|
||||
mut m := 10
|
||||
//m += 10
|
||||
//c := 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user