aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-11 00:34:38 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:13:42 +0800
commite82100367f794856a8807b5fcfe9f0043902a294 (patch)
treebd465d3867a3d411f005dd3fb9bb0c909921b043 /tests/block_test.go
parenta67a15528aa5da902a17d49f5dad19db3975032a (diff)
downloaddexon-e82100367f794856a8807b5fcfe9f0043902a294.tar
dexon-e82100367f794856a8807b5fcfe9f0043902a294.tar.gz
dexon-e82100367f794856a8807b5fcfe9f0043902a294.tar.bz2
dexon-e82100367f794856a8807b5fcfe9f0043902a294.tar.lz
dexon-e82100367f794856a8807b5fcfe9f0043902a294.tar.xz
dexon-e82100367f794856a8807b5fcfe9f0043902a294.tar.zst
dexon-e82100367f794856a8807b5fcfe9f0043902a294.zip
Fix paths
Diffstat (limited to 'tests/block_test.go')
-rw-r--r--tests/block_test.go24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/block_test.go b/tests/block_test.go
index c017b746e..1f2e5a15b 100644
--- a/tests/block_test.go
+++ b/tests/block_test.go
@@ -1,45 +1,49 @@
package tests
import (
+ "path/filepath"
"testing"
)
+var baseDir = filepath.Join(".", "files")
+var blockTestDir = filepath.Join(baseDir, "BlockTests")
+
// TODO: refactor test setup & execution to better align with vm and tx tests
func TestBcValidBlockTests(t *testing.T) {
// SimpleTx3 genesis block does not validate against calculated state root
// as of 2015-06-09. unskip once working /Gustav
- runBlockTestsInFile("files/BlockTests/bcValidBlockTest.json", []string{"SimpleTx3"}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcValidBlockTest.json"), []string{"SimpleTx3"}, t)
}
func TestBcUncleTests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcUncleTest.json", []string{}, t)
- runBlockTestsInFile("files/BlockTests/bcBruncleTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcUncleTest.json"), []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcBruncleTest.json"), []string{}, t)
}
func TestBcUncleHeaderValidityTests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcUncleHeaderValiditiy.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcUncleHeaderValiditiy.json"), []string{}, t)
}
func TestBcInvalidHeaderTests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcInvalidHeaderTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcInvalidHeaderTest.json"), []string{}, t)
}
func TestBcInvalidRLPTests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcInvalidRLPTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcInvalidRLPTest.json"), []string{}, t)
}
func TestBcRPCAPITests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcRPC_API_Test.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcRPC_API_Test.json"), []string{}, t)
}
func TestBcForkBlockTests(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcForkBlockTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcForkBlockTest.json"), []string{}, t)
}
func TestBcTotalDifficulty(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcTotalDifficultyTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcTotalDifficultyTest.json"), []string{}, t)
}
func TestBcWallet(t *testing.T) {
- runBlockTestsInFile("files/BlockTests/bcWalletTest.json", []string{}, t)
+ runBlockTestsInFile(filepath.Join(blockTestDir, "bcWalletTest.json"), []string{}, t)
}