Wrote interface test case
This commit is contained in:
parent
51428e3755
commit
4811ea5257
25
parser/face_test.go
Normal file
25
parser/face_test.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package parser
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestFace (test *testing.T) {
|
||||||
|
checkTree ("../tests/parser/face", false,
|
||||||
|
`:arf
|
||||||
|
---
|
||||||
|
face ro ReadWriter:Face
|
||||||
|
write
|
||||||
|
> data:{Byte ..}
|
||||||
|
< wrote:Int
|
||||||
|
< err:Error
|
||||||
|
read
|
||||||
|
> into:{Byte ..}
|
||||||
|
< read:Int
|
||||||
|
< err:Error
|
||||||
|
face ro Destroyer:Face
|
||||||
|
destroy
|
||||||
|
face ro cFuncInterface
|
||||||
|
> something:Int
|
||||||
|
< someOutput:Int
|
||||||
|
< otherOutput:String
|
||||||
|
`, test)
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
:arf
|
:arf
|
||||||
---
|
---
|
||||||
|
|
||||||
face ro ReadWriter:Face
|
face ro aReadWriter:Face
|
||||||
write
|
write
|
||||||
> data:{Byte ..}
|
> data:{Byte ..}
|
||||||
< wrote:Int
|
< wrote:Int
|
||||||
@ -11,7 +11,10 @@ face ro ReadWriter:Face
|
|||||||
< read:Int
|
< read:Int
|
||||||
< err:Error
|
< err:Error
|
||||||
|
|
||||||
face ro Destroyer:Face
|
face ro bDestroyer:Face
|
||||||
destroy
|
destroy
|
||||||
|
|
||||||
# TODO: add test case for func interface
|
face ro cFuncInterface
|
||||||
|
> something:Int
|
||||||
|
< someOutput:Int
|
||||||
|
< otherOutput:String
|
||||||
|
Reference in New Issue
Block a user