1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

testing: allow tests to import the same module with no custom options

This commit is contained in:
Delyan Angelov
2019-12-13 18:28:39 +02:00
committed by Alexander Medvednikov
parent ec36755407
commit fc64238a39
4 changed files with 66 additions and 21 deletions

View File

@ -0,0 +1,11 @@
import simplemodule
// this tests whether the tests can import the same module without any special
// custom paths setup on the CLI
fn test_iadd(){
assert simplemodule.iadd(10, 20) == 30
}
fn test_imul(){
assert simplemodule.imul(5,8) == 40
}

View File

@ -0,0 +1,9 @@
module simplemodule
pub fn iadd(x int, y int) int {
return x + y
}
pub fn imul(x int, y int) int {
return x * y
}