github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/tests/block_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 19:16:45</date> 10 //</624450121886601216> 11 12 13 package tests 14 15 import ( 16 "testing" 17 ) 18 19 func TestBlockchain(t *testing.T) { 20 t.Parallel() 21 22 bt := new(testMatcher) 23 //一般的状态测试作为区块链测试“导出”,但我们可以在本地运行它们。 24 bt.skipLoad(`^GeneralStateTests/`) 25 //跳过由于自私的挖掘测试而导致的随机失败。 26 bt.skipLoad(`^bcForgedTest/bcForkUncle\.json`) 27 bt.skipLoad(`^bcMultiChainTest/(ChainAtoChainB_blockorder|CallContractFromNotBestBlock)`) 28 bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`) 29 //慢测试 30 bt.slow(`^bcExploitTest/DelegateCallSpam.json`) 31 bt.slow(`^bcExploitTest/ShanghaiLove.json`) 32 bt.slow(`^bcExploitTest/SuicideIssue.json`) 33 bt.slow(`^bcForkStressTest/`) 34 bt.slow(`^bcGasPricerTest/RPC_API_Test.json`) 35 bt.slow(`^bcWalletTest/`) 36 37 //仍未能通过我们需要调查的测试 38 //bt.失败(`^bcstatetests/suicidethecheckbalance.json/suicidethecheckbalance constantinople`,'todo:investive') 39 //bt.失败(`^bcstatetests/suicidestoragecheckvcreate2.json/suicidestoragecheckvcreate2_Constantinople`,'todo:investive') 40 //bt.失败(`^bcstatetests/suicidestoragecheckvcreate.json/suicidestoragecheckvcreate_Constantinople`,'todo:investive') 41 //bt.失败(`^bcstatetests/suicidestoragecheck.json/suicidestoragecheck_constantinople`,'todo:investive') 42 43 bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) { 44 if err := bt.checkFailure(t, name, test.Run()); err != nil { 45 t.Error(err) 46 } 47 }) 48 } 49