github.com/neatio-net/neatio@v1.7.3-0.20231114194659-f4d7a2226baa/tests/transaction_test.go (about) 1 package tests 2 3 import ( 4 "math/big" 5 "testing" 6 7 "github.com/neatio-net/neatio/params" 8 ) 9 10 func TestTransaction(t *testing.T) { 11 t.Parallel() 12 13 txt := new(testMatcher) 14 txt.config(`^Homestead/`, params.ChainConfig{ 15 HomesteadBlock: big.NewInt(0), 16 }) 17 txt.config(`^EIP155/`, params.ChainConfig{ 18 HomesteadBlock: big.NewInt(0), 19 EIP150Block: big.NewInt(0), 20 EIP155Block: big.NewInt(0), 21 EIP158Block: big.NewInt(0), 22 ChainId: big.NewInt(1), 23 }) 24 txt.config(`^Byzantium/`, params.ChainConfig{ 25 HomesteadBlock: big.NewInt(0), 26 EIP150Block: big.NewInt(0), 27 EIP155Block: big.NewInt(0), 28 EIP158Block: big.NewInt(0), 29 ByzantiumBlock: big.NewInt(0), 30 }) 31 32 txt.walk(t, transactionTestDir, func(t *testing.T, name string, test *TransactionTest) { 33 cfg := txt.findConfig(name) 34 if err := txt.checkFailure(t, name, test.Run(cfg)); err != nil { 35 t.Error(err) 36 } 37 }) 38 }