mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
even more feedback
This commit is contained in:
parent
73e9340365
commit
a1defe5e60
1 changed files with 11 additions and 11 deletions
|
|
@ -140,17 +140,6 @@ func (tm *testMatcher) whitelist(pattern string) {
|
|||
tm.whitelistpat = regexp.MustCompile(pattern)
|
||||
}
|
||||
|
||||
func TestWhitelist(t *testing.T) {
|
||||
t.Parallel()
|
||||
tm := new(testMatcher)
|
||||
tm.whitelist("invalid*")
|
||||
tm.walk(t, rlpTestDir, func(t *testing.T, name string, test *RLPTest) {
|
||||
if name[:len("invalidRLPTest.json")] != "invalidRLPTest.json" {
|
||||
t.Fatalf("invalid test found: %s != invalidRLPTest.json", name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// config defines chain config for tests matching the pattern.
|
||||
func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) {
|
||||
tm.configpat = append(tm.configpat, testConfig{regexp.MustCompile(pattern), cfg})
|
||||
|
|
@ -300,3 +289,14 @@ func runTestFunc(runTest interface{}, t *testing.T, name string, m reflect.Value
|
|||
m.MapIndex(reflect.ValueOf(key)),
|
||||
})
|
||||
}
|
||||
|
||||
func TestMatcherWhitelist(t *testing.T) {
|
||||
t.Parallel()
|
||||
tm := new(testMatcher)
|
||||
tm.whitelist("invalid*")
|
||||
tm.walk(t, rlpTestDir, func(t *testing.T, name string, test *RLPTest) {
|
||||
if name[:len("invalidRLPTest.json")] != "invalidRLPTest.json" {
|
||||
t.Fatalf("invalid test found: %s != invalidRLPTest.json", name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue