fix couple of tests
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/mmcloughlin/avo/internal/gen"
|
"github.com/mmcloughlin/avo/internal/gen"
|
||||||
"github.com/mmcloughlin/avo/internal/inst"
|
"github.com/mmcloughlin/avo/internal/inst"
|
||||||
"github.com/mmcloughlin/avo/internal/test"
|
"github.com/mmcloughlin/avo/internal/test"
|
||||||
|
"github.com/mmcloughlin/avo/printer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHaveInstructions(t *testing.T) {
|
func TestHaveInstructions(t *testing.T) {
|
||||||
@@ -70,7 +71,7 @@ func TestInstructionProperties(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestAssembles(t *testing.T) {
|
func TestAssembles(t *testing.T) {
|
||||||
g := gen.NewAsmTest(gen.Config{})
|
g := gen.NewAsmTest(printer.NewDefaultConfig())
|
||||||
b, err := g.Generate(inst.Instructions)
|
b, err := g.Generate(inst.Instructions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/mmcloughlin/avo/internal/inst"
|
"github.com/mmcloughlin/avo/internal/inst"
|
||||||
"github.com/mmcloughlin/avo/internal/load"
|
"github.com/mmcloughlin/avo/internal/load"
|
||||||
"github.com/mmcloughlin/avo/internal/test"
|
"github.com/mmcloughlin/avo/internal/test"
|
||||||
|
"github.com/mmcloughlin/avo/printer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Load(t *testing.T) []inst.Instruction {
|
func Load(t *testing.T) []inst.Instruction {
|
||||||
@@ -21,7 +22,7 @@ func Load(t *testing.T) []inst.Instruction {
|
|||||||
|
|
||||||
func TestAssembles(t *testing.T) {
|
func TestAssembles(t *testing.T) {
|
||||||
is := Load(t)
|
is := Load(t)
|
||||||
g := gen.NewAsmTest(gen.Config{})
|
g := gen.NewAsmTest(printer.NewDefaultConfig())
|
||||||
b, err := g.Generate(is)
|
b, err := g.Generate(is)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user