aboutsummaryrefslogtreecommitdiffstats
path: root/tests/transaction_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/transaction_test.go')
-rw-r--r--tests/transaction_test.go58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/transaction_test.go b/tests/transaction_test.go
new file mode 100644
index 000000000..5e903e4b4
--- /dev/null
+++ b/tests/transaction_test.go
@@ -0,0 +1,58 @@
+package tests
+
+import (
+ "testing"
+)
+
+func TestTransactions(t *testing.T) {
+ notWorking := make(map[string]bool, 100)
+ // TODO: all commented out tests should work!
+
+ snafus := []string{
+ "AddressLessThan20Prefixed0",
+ "DataTest",
+ "EmptyTransaction",
+ "RightVRSTest",
+ "SenderTest",
+ "TransactionWithGasLimitxPriceOverflow",
+ "TransactionWithHihghGas",
+ "TransactionWithHihghGasPrice",
+ "TransactionWithHihghNonce",
+ "TransactionWithHihghValue",
+ "TransactionWithRvalueWrongSize",
+ "TransactionWithSvalueHigh",
+ "TransactionWithSvalueTooHigh",
+ "TransactionWithSvalueWrongSize",
+ "ValuesAsDec",
+ "ValuesAsHex",
+ "libsecp256k1test",
+ "unpadedRValue"}
+
+ for _, name := range snafus {
+ notWorking[name] = true
+ }
+
+ var err error
+ err = RunTransactionTests("./files/TransactionTests/ttTransactionTest.json",
+ notWorking)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestWrongRLPTransactions(t *testing.T) {
+ notWorking := make(map[string]bool, 100)
+ // TODO: all commented out tests should work!
+ notWorking[""] = true
+ notWorking[""] = true
+ notWorking[""] = true
+ notWorking[""] = true
+ notWorking[""] = true
+
+ var err error
+ err = RunTransactionTests("./files/TransactionTests/ttWrongRLPTransaction.json",
+ notWorking)
+ if err != nil {
+ t.Fatal(err)
+ }
+}