clean up the test

pull/3/head
Minh Doan 6 years ago
parent d8c44fd98e
commit c936161b89
  1. 3
      blockchain/block_test.go
  2. 4
      blockchain/blockchain_test.go
  3. 4
      blockchain/transaction_test.go

@ -2,7 +2,6 @@ package blockchain
import (
"bytes"
"fmt"
"testing"
)
@ -24,6 +23,4 @@ func TestBlockSerialize(t *testing.T) {
if bytes.Compare(block.Hash, deserializedBlock.Hash) != 0 {
t.Errorf("Serialize or Deserialize incorrect at Hash.")
}
fmt.Println(block)
}

@ -5,7 +5,9 @@ import (
)
func TestCreateBlockchain(t *testing.T) {
CreateBlockchain("minh")
if CreateBlockchain("minh") == nil {
t.Errorf("failed to create a blockchain")
}
}
func TestFindSpendableOutputs(t *testing.T) {

@ -5,5 +5,7 @@ import (
)
func TestNewCoinbaseTX(t *testing.T) {
NewCoinbaseTX("minh", genesisCoinbaseData)
if NewCoinbaseTX("minh", genesisCoinbaseData) == nil {
t.Errorf("failed to create a coinbase transaction.")
}
}

Loading…
Cancel
Save