diff --git a/bik/bik_test.go b/bik/bik_test.go index 3732de6..d289d41 100644 --- a/bik/bik_test.go +++ b/bik/bik_test.go @@ -115,3 +115,14 @@ func Test_Exists(t *testing.T) { assert.True(t, is) } + +func BenchmarkValidateCorrect(b *testing.B) { + for i := 0; i < b.N; i++ { + _, _ = Validate("044525225") + } +} +func BenchmarkGenerate(b *testing.B) { + for i := 0; i < b.N; i++ { + Generate() + } +} diff --git a/inn/inn_test.go b/inn/inn_test.go index 852ddf0..a317f08 100644 --- a/inn/inn_test.go +++ b/inn/inn_test.go @@ -136,6 +136,18 @@ func TestGenerate(t *testing.T) { }) } +func BenchmarkValidateCorrectLegal(b *testing.B) { + for i := 0; i < b.N; i++ { + _, _ = Validate("7707083893") + } +} + +func BenchmarkValidateCorrectPhysical(b *testing.B) { + for i := 0; i < b.N; i++ { + _, _ = Validate("526317984689") + } +} + func BenchmarkGenerate(b *testing.B) { for i := 0; i < b.N; i++ { Generate() diff --git a/kpp/kpp_test.go b/kpp/kpp_test.go index 12971d8..683af47 100644 --- a/kpp/kpp_test.go +++ b/kpp/kpp_test.go @@ -136,3 +136,14 @@ func Test_Generate(t *testing.T) { assert.True(t, isValid) } + +func BenchmarkValidateCorrect(b *testing.B) { + for i := 0; i < b.N; i++ { + _, _ = Validate("775001001") + } +} +func BenchmarkGenerate(b *testing.B) { + for i := 0; i < b.N; i++ { + Generate() + } +}