Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksnyder committed Sep 28, 2020
1 parent b7176e8 commit e98a43f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v2/i18n/localizer_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package i18n

import (
"fmt"
"reflect"
"testing"

Expand Down Expand Up @@ -654,6 +655,14 @@ func TestMessageIDMismatchError(t *testing.T) {
}
}

func TestInvalidPluralCountError(t *testing.T) {
actual := (&invalidPluralCountErr{messageID: "hello", pluralCount: "blah", err: fmt.Errorf("error")}).Error()
expected := `invalid plural count "blah" for message id "hello": error`
if actual != expected {
t.Fatalf("expected %q; got %q", expected, actual)
}
}

func TestMustLocalize(t *testing.T) {
defer func() {
if recover() == nil {
Expand Down

0 comments on commit e98a43f

Please sign in to comment.