compiler, libgo: Permit testing package when test imports it circularly.
From-SVN: r195931
This commit is contained in:
parent
8e29a61c2d
commit
d54fc07473
16 changed files with 84 additions and 264 deletions
|
@ -2,12 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package syntax_test
|
||||
package syntax
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
. "regexp/syntax"
|
||||
"testing"
|
||||
"unicode"
|
||||
)
|
||||
|
@ -413,13 +412,13 @@ func TestFoldConstants(t *testing.T) {
|
|||
if unicode.SimpleFold(i) == i {
|
||||
continue
|
||||
}
|
||||
if last == -1 && MinFold != i {
|
||||
t.Errorf("MinFold=%#U should be %#U", MinFold, i)
|
||||
if last == -1 && minFold != i {
|
||||
t.Errorf("minFold=%#U should be %#U", minFold, i)
|
||||
}
|
||||
last = i
|
||||
}
|
||||
if MaxFold != last {
|
||||
t.Errorf("MaxFold=%#U should be %#U", MaxFold, last)
|
||||
if maxFold != last {
|
||||
t.Errorf("maxFold=%#U should be %#U", maxFold, last)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,11 +429,11 @@ func TestAppendRangeCollapse(t *testing.T) {
|
|||
// Note that we are not calling cleanClass.
|
||||
var r []rune
|
||||
for i := rune('A'); i <= 'Z'; i++ {
|
||||
r = AppendRange(r, i, i)
|
||||
r = AppendRange(r, i+'a'-'A', i+'a'-'A')
|
||||
r = appendRange(r, i, i)
|
||||
r = appendRange(r, i+'a'-'A', i+'a'-'A')
|
||||
}
|
||||
if string(r) != "AZaz" {
|
||||
t.Errorf("AppendRange interlaced A-Z a-z = %s, want AZaz", string(r))
|
||||
t.Errorf("appendRange interlaced A-Z a-z = %s, want AZaz", string(r))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue