1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/builtin/bare/.checks/checks.v
bogen85 8178e1f7da freestanding: malloc/free with mm_alloc an mm_free
Added more array support that depends on malloc. Added string clone (that uses malloc). Added test for it. Eliminated stack allocated buffers from most of the unit checks.
2019-12-08 13:44:52 +03:00

32 lines
479 B
V

module main
import os
fn failed (msg string) {
println ("!!! failed: $msg")
}
fn passed (msg string) {
println (">>> passed: $msg")
}
fn vcheck(vfile string) {
run_check := "v -user_mod_path . -freestanding run "
if 0 == os.system("$run_check $vfile/${vfile}.v") {
passed(run_check)
} else {
failed(run_check)
}
os.system("ls -lh $vfile/$vfile")
os.system("rm -f $vfile/$vfile")
}
fn main() {
vcheck("linuxsys")
vcheck("string")
vcheck("consts")
exit(0)
}