Wrote unit test for methods
This commit is contained in:
parent
f703dead1d
commit
0f7e2e3f10
@ -93,3 +93,31 @@ testString (test,
|
|||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestFunction (test *testing.T) {
|
||||||
|
testString (test,
|
||||||
|
// correct
|
||||||
|
`[arguments x:Int y:Int z:Int] = {}
|
||||||
|
[arrayArguments arg:4:54:23:28:(x:Int y:Int)] = {}`,
|
||||||
|
//input
|
||||||
|
`
|
||||||
|
[arguments x:Int y:Int z:Int] = { }
|
||||||
|
[arrayArguments arg:4:54:23:28:(x:Int y:Int)] = { }
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestMethod (test *testing.T) {
|
||||||
|
testString (test,
|
||||||
|
// correct
|
||||||
|
`BopIt: Int
|
||||||
|
BopIt.[bop force:UInt] = {}
|
||||||
|
BopIt.[twist angle:F64] = {}
|
||||||
|
BopIt.[pull distance:Int] = {}`,
|
||||||
|
//input
|
||||||
|
`
|
||||||
|
BopIt: Int
|
||||||
|
BopIt.[bop force:UInt] = { }
|
||||||
|
BopIt.[twist angle:F64] = { }
|
||||||
|
BopIt.[pull distance:Int] = { }
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user