github.com/linapex/ethereum-dpos-chinese@v0.0.0-20190316121959-b78b3a4a1ece/tests/transaction_test.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 12:09:50</date> 10 //</624342686295396352> 11 12 // 13 // 14 // 15 // 16 // 17 // 18 // 19 // 20 // 21 // 22 // 23 // 24 // 25 // 26 // 27 28 package tests 29 30 import ( 31 "math/big" 32 "testing" 33 34 "github.com/ethereum/go-ethereum/params" 35 ) 36 37 func TestTransaction(t *testing.T) { 38 t.Parallel() 39 40 txt := new(testMatcher) 41 txt.config(`^Homestead/`, params.ChainConfig{ 42 HomesteadBlock: big.NewInt(0), 43 }) 44 txt.config(`^EIP155/`, params.ChainConfig{ 45 HomesteadBlock: big.NewInt(0), 46 EIP150Block: big.NewInt(0), 47 EIP155Block: big.NewInt(0), 48 EIP158Block: big.NewInt(0), 49 ChainID: big.NewInt(1), 50 }) 51 txt.config(`^Byzantium/`, params.ChainConfig{ 52 HomesteadBlock: big.NewInt(0), 53 EIP150Block: big.NewInt(0), 54 EIP155Block: big.NewInt(0), 55 EIP158Block: big.NewInt(0), 56 ByzantiumBlock: big.NewInt(0), 57 }) 58 59 txt.walk(t, transactionTestDir, func(t *testing.T, name string, test *TransactionTest) { 60 cfg := txt.findConfig(name) 61 if err := txt.checkFailure(t, name, test.Run(cfg)); err != nil { 62 t.Error(err) 63 } 64 }) 65 } 66