github.com/yinchengtsinghua/golang-Eos-dpos-Ethereum@v0.0.0-20190121132951-92cc4225ed8e/tests/transaction_test.go (about)

     1  
     2  //此源码被清华学神尹成大魔王专业翻译分析并修改
     3  //尹成QQ77025077
     4  //尹成微信18510341407
     5  //尹成所在QQ群721929980
     6  //尹成邮箱 yinc13@mails.tsinghua.edu.cn
     7  //尹成毕业于清华大学,微软区块链领域全球最有价值专家
     8  //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
     9  //
    10  //
    11  //
    12  //
    13  //
    14  //
    15  //
    16  //
    17  //
    18  //
    19  //
    20  //
    21  //
    22  //
    23  //
    24  
    25  package tests
    26  
    27  import (
    28  	"math/big"
    29  	"testing"
    30  
    31  	"github.com/ethereum/go-ethereum/params"
    32  )
    33  
    34  func TestTransaction(t *testing.T) {
    35  	t.Parallel()
    36  
    37  	txt := new(testMatcher)
    38  	txt.config(`^Homestead/`, params.ChainConfig{
    39  		HomesteadBlock: big.NewInt(0),
    40  	})
    41  	txt.config(`^EIP155/`, params.ChainConfig{
    42  		HomesteadBlock: big.NewInt(0),
    43  		EIP150Block:    big.NewInt(0),
    44  		EIP155Block:    big.NewInt(0),
    45  		EIP158Block:    big.NewInt(0),
    46  		ChainID:        big.NewInt(1),
    47  	})
    48  	txt.config(`^Byzantium/`, params.ChainConfig{
    49  		HomesteadBlock: big.NewInt(0),
    50  		EIP150Block:    big.NewInt(0),
    51  		EIP155Block:    big.NewInt(0),
    52  		EIP158Block:    big.NewInt(0),
    53  		ByzantiumBlock: big.NewInt(0),
    54  	})
    55  
    56  	txt.walk(t, transactionTestDir, func(t *testing.T, name string, test *TransactionTest) {
    57  		cfg := txt.findConfig(name)
    58  		if err := txt.checkFailure(t, name, test.Run(cfg)); err != nil {
    59  			t.Error(err)
    60  		}
    61  	})
    62  }