Add #31 as test case

This commit is contained in:
Sasha Koshka 2024-02-10 21:10:49 -05:00
parent 05f31c00a8
commit d6d7423087
1 changed files with 14 additions and 0 deletions

View File

@ -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]
`)
}