mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
move compiler tests to compiler/
This commit is contained in:
@ -795,7 +795,7 @@ fn new_v(args[]string) *V {
|
||||
os.write_file(TmpPath + '/VROOT', lang_dir)
|
||||
} else {
|
||||
println('V repo not found. Cloning...')
|
||||
exit(1)
|
||||
exit(1)
|
||||
os.mv('v', 'v.bin')
|
||||
os.exec('git clone https://github.com/vlang/v')
|
||||
if !os.dir_exists('v') {
|
||||
|
43
compiler/tests/fn_test.v
Normal file
43
compiler/tests/fn_test.v
Normal file
@ -0,0 +1,43 @@
|
||||
type myfn fn (int) string
|
||||
|
||||
type myfn2 fn (a int, b int) int
|
||||
|
||||
type myfn3 fn (int, int)
|
||||
|
||||
fn myfn4(string)
|
||||
|
||||
fn foobar()
|
||||
|
||||
fn slopediv(num u32, den u32) int
|
||||
|
||||
type f1 fn ()
|
||||
|
||||
type f2 fn (voidptr)
|
||||
|
||||
type f3 fn (voidptr, voidptr)
|
||||
|
||||
type f4 fn (voidptr) int
|
||||
|
||||
type f5 fn (int, int) int
|
||||
|
||||
type f6 fn (int, int)
|
||||
|
||||
fn C.atoi(byteptr) int
|
||||
|
||||
fn foo() {
|
||||
}
|
||||
|
||||
type actionf_v fn ()
|
||||
|
||||
type actionf_p1 fn (voidptr)
|
||||
|
||||
type actionf_p2 fn (voidptr, voidptr)
|
||||
|
||||
fn myprint(s string, ..) {
|
||||
println('my print')
|
||||
}
|
||||
|
||||
fn test_fns() {
|
||||
// no asserts for now, just test function declarations above
|
||||
}
|
||||
|
Reference in New Issue
Block a user