Add #31 as test case
This commit is contained in:
parent
05f31c00a8
commit
d6d7423087
|
@ -53,3 +53,17 @@ StringHolder.[setString string:String] = {
|
|||
}
|
||||
`)
|
||||
}
|
||||
|
||||
func TestMethodChained (test *testing.T) {
|
||||
testString (test,
|
||||
`
|
||||
Number: Int
|
||||
|
||||
Number.[add x:Number] = [+ [.this] x]
|
||||
Number.[sub x:Number] = [- [.this] x]
|
||||
Number.[mul x:Number] = [* [.this] x]
|
||||
Number.[div x:Number] = [/ [.this] x]
|
||||
|
||||
[main]: Number = [~Number 5].[add 8].[mul 3]
|
||||
`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue