Files
any2anexoj/internal/nature_test.go
Natercio Moniz 70466b7886
Some checks failed
Generate check / check-changes (push) Successful in 4s
Generate check / check-changes (pull_request) Successful in 3s
Quality / check-changes (pull_request) Successful in 3s
Generate check / check-generate (push) Has been skipped
Generate check / check-generate (pull_request) Successful in 8s
Quality / tests (pull_request) Failing after 42s
fix typos and copy paste test names
2025-11-24 16:23:57 +00:00

39 lines
616 B
Go

package internal_test
import (
"testing"
"github.com/nmoniz/any2anexoj/internal"
)
func TestNature_String(t *testing.T) {
tests := []struct {
name string
nature internal.Nature
want string
}{
{
name: "return unknown",
want: "unknown",
},
{
name: "return G01",
nature: internal.NatureG01,
want: "G01",
},
{
name: "return G20",
nature: internal.NatureG20,
want: "G20",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := tt.nature.String()
if tt.want != got {
t.Fatalf("want %q but got %q", tt.want, got)
}
})
}
}