github.com/sberex/go-sberex@v1.8.2-0.20181113200658-ed96ac38f7d7/tests/block_test.go (about)

     1  // This file is part of the go-sberex library. The go-sberex library is 
     2  // free software: you can redistribute it and/or modify it under the terms 
     3  // of the GNU Lesser General Public License as published by the Free 
     4  // Software Foundation, either version 3 of the License, or (at your option)
     5  // any later version.
     6  //
     7  // The go-sberex library is distributed in the hope that it will be useful, 
     8  // but WITHOUT ANY WARRANTY; without even the implied warranty of
     9  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 
    10  // General Public License <http://www.gnu.org/licenses/> for more details.
    11  
    12  package tests
    13  
    14  import (
    15  	"testing"
    16  )
    17  
    18  func TestBlockchain(t *testing.T) {
    19  	t.Parallel()
    20  
    21  	bt := new(testMatcher)
    22  	// General state tests are 'exported' as blockchain tests, but we can run them natively.
    23  	bt.skipLoad(`^GeneralStateTests/`)
    24  	// Skip random failures due to selfish mining test.
    25  	bt.skipLoad(`^bcForgedTest/bcForkUncle\.json`)
    26  	bt.skipLoad(`^bcMultiChainTest/(ChainAtoChainB_blockorder|CallContractFromNotBestBlock)`)
    27  	bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
    28  	// Constantinople is not implemented yet.
    29  	bt.skipLoad(`(?i)(constantinople)`)
    30  
    31  	// Still failing tests
    32  	bt.skipLoad(`^bcWalletTest.*_Byzantium$`)
    33  
    34  	bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) {
    35  		if err := bt.checkFailure(t, name, test.Run()); err != nil {
    36  			t.Error(err)
    37  		}
    38  	})
    39  }