func TestFunction(t *testing.T) { var f big.Int for _, tc := range tcs { if sf := swing.SwingingFactorial(&f, tc.n).String(); sf != tc.s { t.Errorf("wrong swinging factorial for %d. Expected %s, got %s:", tc.n, tc.s, sf) } } }
func BenchmarkFunction1e6(b *testing.B) { var f big.Int for i := 0; i < b.N; i++ { swing.SwingingFactorial(&f, 1e6) } }