aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test.go
blob: bdf9837867b3f806ed9b0f478cf80b558e56b824 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package tests

import (
    "path/filepath"
    "testing"
)

func TestBcValidBlockTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcValidBlockTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcUncleTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcUncleTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
    err = RunBlockTest(filepath.Join(blockTestDir, "bcBruncleTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcUncleHeaderValidityTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcUncleHeaderValiditiy.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcInvalidHeaderTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcInvalidHeaderTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcInvalidRLPTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcInvalidRLPTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcRPCAPITests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcRPC_API_Test.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcForkBlockTests(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcForkBlockTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcTotalDifficulty(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcTotalDifficultyTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}

func TestBcWallet(t *testing.T) {
    err := RunBlockTest(filepath.Join(blockTestDir, "bcWalletTest.json"), BlockSkipTests)
    if err != nil {
        t.Fatal(err)
    }
}