accounts/abi/bind: don't define link test case table as a package-private variable

This commit is contained in:
Jared Wasinger 2024-12-19 17:05:47 +07:00 committed by Felix Lange
parent 7f301229bf
commit 6afe90dddd

View file

@ -205,7 +205,8 @@ func testLinkCase(tcInput linkTestCaseInput) error {
return nil return nil
} }
var linkTestCases = []linkTestCaseInput{ func TestContractLinking(t *testing.T) {
for i, tc := range []linkTestCaseInput{
// test simple contract without any dependencies or overrides // test simple contract without any dependencies or overrides
{ {
map[rune][]rune{ map[rune][]rune{
@ -319,10 +320,7 @@ var linkTestCases = []linkTestCaseInput{
map[rune]struct{}{ map[rune]struct{}{
'a': {}, 'b': {}, 'c': {}, 'd': {}, 'e': {}, 'f': {}, 'g': {}, 'h': {}, 'm': {}}, 'a': {}, 'b': {}, 'c': {}, 'd': {}, 'e': {}, 'f': {}, 'g': {}, 'h': {}, 'm': {}},
}, },
} } {
func TestContractLinking(t *testing.T) {
for i, tc := range linkTestCases {
if err := testLinkCase(tc); err != nil { if err := testLinkCase(tc); err != nil {
t.Fatalf("test case %d failed: %v", i, err) t.Fatalf("test case %d failed: %v", i, err)
} }