mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-23 08:30:07 -03:00
add TestIsAuxiliaryLanguage
Signed-off-by: Davor Kapsa <davor.kapsa@gmail.com>
This commit is contained in:
parent
03e4a029c2
commit
039c4b9628
@ -9,6 +9,31 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func (s *EnryTestSuite) TestIsAuxiliaryLanguage() {
|
||||
type testType struct {
|
||||
name string
|
||||
lang string
|
||||
expected bool
|
||||
}
|
||||
|
||||
tests := []testType{
|
||||
{name: "TestIsAuxiliaryLanguage_Invalid", lang: "invalid", expected: false},
|
||||
}
|
||||
for k := range auxiliaryLanguages {
|
||||
t := testType{
|
||||
name: fmt.Sprintf("TestIsAuxiliaryLanguage_%s", k),
|
||||
lang: k,
|
||||
expected: true,
|
||||
}
|
||||
tests = append(tests, t)
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
is := IsAuxiliaryLanguage(test.lang)
|
||||
assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected))
|
||||
}
|
||||
}
|
||||
|
||||
func (s *EnryTestSuite) TestIsVendor() {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
Loading…
x
Reference in New Issue
Block a user