rename overload_extendc testcase

This commit is contained in:
William S Fulton 2016-02-21 16:17:00 +00:00
commit 0bd41dc14d
7 changed files with 11 additions and 11 deletions

View file

@ -0,0 +1,33 @@
package main
import "./overload_extend2"
func main() {
f := overload_extend2.NewFoo()
if f.Test(3) != 1 {
panic(0)
}
if f.Test("hello") != 2 {
panic(0)
}
if f.Test(3.5, 2.5) != 3 {
panic(0)
}
if f.Test("hello", 20) != 1020 {
panic(0)
}
if f.Test("hello", 20, 100) != 120 {
panic(0)
}
// C default args
if f.Test(f) != 30 {
panic(0)
}
if f.Test(f, 100) != 120 {
panic(0)
}
if f.Test(f, 100, 200) != 300 {
panic(0)
}
}