moth/cmd/mothd/transpiler_test.go

18 lines
283 B
Go
Raw Normal View History

2020-09-08 17:49:02 -06:00
package main
import (
2022-05-10 13:20:54 -06:00
"os"
2020-09-08 17:49:02 -06:00
"testing"
)
func TestTranspiler(t *testing.T) {
2022-05-10 13:20:54 -06:00
p := NewTranspilerProvider(os.DirFS("testdata"))
2020-09-08 17:49:02 -06:00
inv := p.Inventory()
if len(inv) != 1 {
t.Error("Wrong inventory:", inv)
2021-03-05 14:42:57 -07:00
} else if len(inv[0].Puzzles) != 2 {
t.Error("Wrong puzzles:", inv)
2020-09-08 17:49:02 -06:00
}
}