]> Cypherpunks repositories - gostls13.git/commitdiff
exp/norm: fix rune/int types in test
authorJoel Sing <jsing@google.com>
Sun, 11 Dec 2011 17:25:09 +0000 (09:25 -0800)
committerRob Pike <r@golang.org>
Sun, 11 Dec 2011 17:25:09 +0000 (09:25 -0800)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5472067

src/pkg/exp/norm/normregtest.go

index d214ce11bc2b02a4534f75d8e4b64fa9f9c0b009..eb061eba23d2cccb64cb8623fa6d2689807e60f0 100644 (file)
@@ -177,7 +177,7 @@ func loadTestData() {
                                }
                                if test.r == 0 {
                                        // save for CharacterByCharacterTests
-                                       test.r = int(r)
+                                       test.r = rune(r)
                                }
                                var buf [utf8.UTFMax]byte
                                sz := utf8.EncodeRune(buf[:], rune(r))
@@ -242,9 +242,9 @@ func doConformanceTests(t *Test, partn int) {
 
 func CharacterByCharacterTests() {
        tests := part[1].tests
-       last := 0
+       var last rune = 0
        for i := 0; i <= len(tests); i++ { // last one is special case
-               var r int
+               var r rune
                if i == len(tests) {
                        r = 0x2FA1E // Don't have to go to 0x10FFFF
                } else {