package datastructures

import "testing"

func TestFactorial(t *testing.T) {

	cases := []struct {
		Name     string
		Input    int
		Expected int
	}{
		{
			"Factorial of 5",
			5,
			120,
		},
		{
			"Factorial of 10",
			10,
			3628800,
		},
		{
			"Factorial of 12",
			12,
			479001600,
		},
	}

	for _, test := range cases {
		t.Run(test.Name, func(t *testing.T) {
			got := Factorial(test.Input)

			if got != test.Expected {
				t.Errorf("Error got: %d want: %d", got, test.Expected)
			}
		})
	}
}
