Go-ethereum 源码解析之 core/types/transaction_test.go
运行测试
TestTransactionSigHash
[furnace@localhost types]$ go test -v -run="TestTransactionSigHash"
=== RUN TestTransactionSigHash
--- PASS: TestTransactionSigHash (0.00s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.015s
[furnace@localhost types]$
TestTransactionEncode
[furnace@localhost types]$ go test -v -run="TestTransactionEncode"
=== RUN TestTransactionEncode
--- PASS: TestTransactionEncode (0.00s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.016s
[furnace@localhost types]$
TestRecipientEmpty
[furnace@localhost types]$ go test -v -run="TestRecipientEmpty"
=== RUN TestRecipientEmpty
--- PASS: TestRecipientEmpty (0.00s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.018s
[furnace@localhost types]$
TestRecipientNormal
[furnace@localhost types]$ go test -v -run="TestRecipientNormal"
=== RUN TestRecipientNormal
--- PASS: TestRecipientNormal (0.00s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.015s
[furnace@localhost types]$
TestTransactionPriceNonceSort
[furnace@localhost types]$ go test -v -run="TestTransactionPriceNonceSort"
=== RUN TestTransactionPriceNonceSort
--- PASS: TestTransactionPriceNonceSort (0.19s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.208s
[furnace@localhost types]$
TestTransactionJSON
[furnace@localhost types]$ go test -v -run="TestTransactionJSON"
=== RUN TestTransactionJSON
--- PASS: TestTransactionJSON (0.01s)
PASS
ok github.com/ethereum/go-ethereum/core/types 0.027s
[furnace@localhost types]$
Reference
- https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction_test.go
Contributor
- Windstamp, https://github.com/windstamp