21 lines
276 B
Go
21 lines
276 B
Go
|
|
package test
|
||
|
|
|
||
|
|
import "testing"
|
||
|
|
|
||
|
|
import "github.com/firestuff/subcoding/asm"
|
||
|
|
|
||
|
|
func TestRoundTrip(t *testing.T) {
|
||
|
|
prog, err := asm.AssembleString(`
|
||
|
|
functions:
|
||
|
|
- - [nop]
|
||
|
|
`)
|
||
|
|
if err != nil {
|
||
|
|
t.Fatal(err)
|
||
|
|
}
|
||
|
|
|
||
|
|
_, err = asm.Disassemble(prog)
|
||
|
|
if err != nil {
|
||
|
|
t.Fatal(err)
|
||
|
|
}
|
||
|
|
}
|