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
Delyan Angelov b7c477cc18 freestanding: ptr_str, string concat, struct declaration
* compiler: extract c_common_macros from c_headers, and use it in bare_c_headers too. Support for ptr_str and string concatenation in -freestanding mode.

* Add tests for structs and string concatenation in -freestanding mode .

* Move check_string_add_works to string/string.v .
2019-12-16 19:05:33 +03:00

33 lines
498 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")
vcheck("structs")
exit(0)
}