You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
339 B

package fractran
import (
"testing"
)
func TestFractran(t *testing.T) {
p := program{
{91, 33},
{11, 13},
{1, 11},
{399, 34},
{17, 19},
{1, 17},
{2, 7},
{187, 5},
{1, 3},
}
input := 31250
res := exec(p, input)
if res[0] != 8192 {
t.Errorf("did not get correct result. expected=%v, got=%v", 8192, res[0])
}
}