Wrote interface test case

This commit is contained in:
Sasha Koshka 2022-09-29 11:28:12 -04:00
parent 51428e3755
commit 4811ea5257
2 changed files with 31 additions and 3 deletions

25
parser/face_test.go Normal file
View 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)
}

View File

@ -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