aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2013-09-10 23:04:45 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2013-09-10 23:04:56 +0000
commit1e9d3b1392b604fafc6802e4d43469f519d14424 (patch)
tree080d4cbc834eb27bbe87435959700020cde9705b /src/test
parent9a09c0091c33a8f22f48b5e6e5b8f3b400c43ff3 (diff)
Bugfix: Since test_bitcoin is being built and run inside src/test/, try using relative directories from that point
Diffstat (limited to 'src/test')
-rw-r--r--src/test/alert_tests.cpp5
-rw-r--r--src/test/checkblock_tests.cpp2
-rw-r--r--src/test/script_tests.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index f7a11376d3..ed6dcd8186 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -73,7 +73,7 @@ struct ReadAlerts
{
std::string filename("alertTests");
namespace fs = boost::filesystem;
- fs::path testFile = fs::current_path() / "test" / "data" / filename;
+ fs::path testFile = fs::current_path() / "data" / filename;
#ifdef TEST_DATA_DIR
if (!fs::exists(testFile))
{
@@ -125,6 +125,9 @@ BOOST_AUTO_TEST_CASE(AlertApplies)
{
BOOST_CHECK(alert.CheckSignature());
}
+
+ BOOST_CHECK(alerts.size() >= 3);
+
// Matches:
BOOST_CHECK(alerts[0].AppliesTo(1, ""));
BOOST_CHECK(alerts[0].AppliesTo(70001, ""));
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 5675c40e76..e34680db99 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -19,7 +19,7 @@ bool
read_block(const std::string& filename, CBlock& block)
{
namespace fs = boost::filesystem;
- fs::path testFile = fs::current_path() / "test" / "data" / filename;
+ fs::path testFile = fs::current_path() / "data" / filename;
#ifdef TEST_DATA_DIR
if (!fs::exists(testFile))
{
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index c1f6f178db..423a2ff185 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -93,7 +93,7 @@ Array
read_json(const std::string& filename)
{
namespace fs = boost::filesystem;
- fs::path testFile = fs::current_path() / "test" / "data" / filename;
+ fs::path testFile = fs::current_path() / "data" / filename;
#ifdef TEST_DATA_DIR
if (!fs::exists(testFile))