aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-07-26 16:33:45 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-08-02 14:30:53 +0200
commitcdf4089457856bdfe336b6f4b337d7e1ea4fdbd3 (patch)
tree9c7e66306acaff0756d5a871b8556220f5a90bfa /src/test/script_tests.cpp
parente57766906237834906b979a59015eed218d34656 (diff)
downloadbitcoin-cdf4089457856bdfe336b6f4b337d7e1ea4fdbd3.tar.xz
Remove redundant assignments (dead stores)
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 510910e149..643da90f09 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -937,17 +937,19 @@ BOOST_AUTO_TEST_CASE(script_build)
}
}
+#ifdef UPDATE_JSON_TESTS
std::string strGen;
-
+#endif
for (TestBuilder& test : tests) {
test.Test();
std::string str = JSONPrettyPrint(test.GetJSON());
-#ifndef UPDATE_JSON_TESTS
+#ifdef UPDATE_JSON_TESTS
+ strGen += str + ",\n";
+#else
if (tests_set.count(str) == 0) {
BOOST_CHECK_MESSAGE(false, "Missing auto script_valid test: " + test.GetComment());
}
#endif
- strGen += str + ",\n";
}
#ifdef UPDATE_JSON_TESTS