v/vlib/v/gen/native/tests/print.vv

44 lines
545 B
V

struct Foo {
a int
b int
c int
}
fn test_stdout() {
print('Hello ')
println('World')
}
fn test_booleans() {
println(true)
println(false)
}
fn test_numbers() {
println(123)
}
fn test_oof() {
println(__offsetof(Foo, a))
println(__offsetof(Foo, b))
println(__offsetof(Foo, c))
}
fn test_stderr() {
eprint('2(Hello)')
eprintln('2(World)')
}
fn test_idents() {
x := 5
// println(x) uncomment again when int-to-string conversion is working
}
fn main() {
test_stdout()
test_stderr()
test_numbers()
test_oof()
test_idents()
}