Add bcTotalDifficultyTest and unskip now working tx tests

pull/875/head
Gustav Simonsson 10 years ago
parent 2b716aec54
commit 79eb40fc9f
  1. 4
      tests/block_test.go
  2. 6
      tests/transaction_test.go
  3. 2
      tests/transaction_test_util.go

@ -44,6 +44,10 @@ func TestBcForkBlockTests(t *testing.T) {
runBlockTestsInFile("files/BlockTests/bcForkBlockTest.json", []string{}, t) runBlockTestsInFile("files/BlockTests/bcForkBlockTest.json", []string{}, t)
} }
func TestBcTotalDifficulty(t *testing.T) {
runBlockTestsInFile("files/BlockTests/bcTotalDifficultyTest.json", []string{}, t)
}
func runBlockTestsInFile(filepath string, snafus []string, t *testing.T) { func runBlockTestsInFile(filepath string, snafus []string, t *testing.T) {
bt, err := LoadBlockTests(filepath) bt, err := LoadBlockTests(filepath)
if err != nil { if err != nil {

@ -9,9 +9,7 @@ func TestTransactions(t *testing.T) {
// TODO: all these tests should work! remove them from the array when they work // TODO: all these tests should work! remove them from the array when they work
snafus := []string{ snafus := []string{
"TransactionWithHihghNonce", // fails due to testing upper bound of 256 bit nonce "TransactionWithHihghNonce256", // fails due to testing upper bound of 256 bit nonce
"TransactionWithSvalueHigh", // fails due to C++ wrong ECDSA r,s ranges. see https://github.com/ethereum/yellowpaper/pull/112
"TransactionWithSvalue0", // Invalid, 0 < s according to YP eq 205. probably typo/copy-paste error
} }
for _, name := range snafus { for _, name := range snafus {
@ -36,9 +34,7 @@ func TestWrongRLPTransactions(t *testing.T) {
} }
} }
//Not working until it's fields are in HEX
func Test10MBtx(t *testing.T) { func Test10MBtx(t *testing.T) {
t.Skip("Skipped in lieu of HEX encoding fix in this file.")
notWorking := make(map[string]bool, 100) notWorking := make(map[string]bool, 100)
var err error var err error
err = RunTransactionTests("./files/TransactionTests/tt10mbDataField.json", err = RunTransactionTests("./files/TransactionTests/tt10mbDataField.json",

@ -58,7 +58,7 @@ func runTest(txTest TransactionTest) (err error) {
return nil return nil
} else { } else {
// RLP decoding failed but is expected to succeed (test FAIL) // RLP decoding failed but is expected to succeed (test FAIL)
return errors.New("RLP decoding failed when expected to succeed") return fmt.Errorf("RLP decoding failed when expected to succeed: ", err)
} }
} }

Loading…
Cancel
Save