Skip to content

Commit

Permalink
cases: skip tests if unicode.Version does not match UnicodeVersion
Browse files Browse the repository at this point in the history
For golang/go#11811.
Fixes golang/go#11927.

Change-Id: Ie60c687ba93aaeb6c164413289f474be63e0224f
Reviewed-on: https://go-review.googlesource.com/13252
Reviewed-by: Robert Griesemer <[email protected]>
  • Loading branch information
rsc committed Aug 5, 2015
1 parent 43df643 commit 083de50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cases/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func contextFromRune(r rune) *context {
}

func TestCaseProperties(t *testing.T) {
if unicode.Version != UnicodeVersion {
t.Skipf("UnicodeVersion=%s, but unicode.Version=%s", UnicodeVersion, unicode.Version)
}
assigned := rangetable.Assigned(UnicodeVersion)
for r := rune(0); r <= lastRuneForTesting; r++ {
if !unicode.In(r, assigned) || !unicode.In(unicode.SimpleFold(r), assigned) {
Expand All @@ -89,6 +92,9 @@ func TestCaseProperties(t *testing.T) {
}

func TestMapping(t *testing.T) {
if unicode.Version != UnicodeVersion {
t.Skipf("UnicodeVersion=%s, but unicode.Version=%s", UnicodeVersion, unicode.Version)
}
assigned := rangetable.Assigned(UnicodeVersion)
apply := func(r rune, f func(c *context) bool) string {
c := contextFromRune(r)
Expand Down

0 comments on commit 083de50

Please sign in to comment.