Add problematic multiunit test case from #49
This commit is contained in:
parent
e5344c034b
commit
b3ae80e809
|
@ -0,0 +1,28 @@
|
|||
package generator
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestUnitWriterInterface (test *testing.T) {
|
||||
testUnits (test,
|
||||
`
|
||||
`,
|
||||
`[sayHello writer:io::Writer] = writer.[write 'well hello their\n']
|
||||
|
||||
[main]: I32 'main' = {
|
||||
stdout:io::File = 1
|
||||
[sayHello stdout]
|
||||
0
|
||||
}`,
|
||||
|
||||
"cstdio.fspl",
|
||||
`+ FileDescriptor: Int
|
||||
+ [write file:FileDescriptor buffer:*Byte count:Index]: Index 'write'`,
|
||||
|
||||
"io.fspl",
|
||||
`+ Writer: (~ [write buffer:*:Byte]: Index)
|
||||
+ File: cstdio::FileDescriptor
|
||||
+ File.[write buffer:*:Byte]:Index =
|
||||
cstdio::[write
|
||||
[~cstdio::FileDescriptor [.this]]
|
||||
[~*Byte buffer] [#buffer]]`,
|
||||
)}
|
Loading…
Reference in New Issue