aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-10-15 12:39:33 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2014-10-15 12:43:16 -0700
commite8f6d54f1f58d9a5998e37367b84b427e51e1ad7 (patch)
tree8b40c5a3f4e10c1951a9fc7d327e15cbc632c8f2 /src/test
parent992ab87114b8c9ea8230e97a9c8d8bd71939074d (diff)
parent5f4bcf6b14eb45da408e19295332d2a8486d70df (diff)
Merge pull request #5082
5f4bcf6 boost: drop boost dependency in version.cpp. (Cory Fields) 352058e boost: drop boost dependency in utilstrencodings.cpp (Cory Fields) e1c9467 boost: drop boost dependency in core.cpp (Cory Fields) e405aa4 boost: remove CPrivKey dependency from CECKey (Cory Fields) 5295506 boost: drop dependency on tuple in serialization (Cory Fields) 1d9b86d boost: drop dependency on is_fundamental in serialization (Cory Fields)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/util_tests.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 6378bd0941..61daa0a3fe 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -9,6 +9,7 @@
#include "sync.h"
#include "utilstrencodings.h"
#include "utilmoneystr.h"
+#include "version.h"
#include <stdint.h>
#include <vector>
@@ -341,4 +342,15 @@ BOOST_AUTO_TEST_CASE(test_FormatParagraph)
BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n test");
}
+BOOST_AUTO_TEST_CASE(test_FormatSubVersion)
+{
+ std::vector<std::string> comments;
+ comments.push_back(std::string("comment1"));
+ std::vector<std::string> comments2;
+ comments2.push_back(std::string("comment1"));
+ comments2.push_back(std::string("comment2"));
+ BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector<std::string>()),std::string("/Test:0.9.99/"));
+ BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments),std::string("/Test:0.9.99(comment1)/"));
+ BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2),std::string("/Test:0.9.99(comment1; comment2)/"));
+}
BOOST_AUTO_TEST_SUITE_END()