From f76392f4762e51c0506c1fd1fd18c978f491debf Mon Sep 17 00:00:00 2001 From: open-license-manager <rillf@maildrop.cc> Date: 周五, 12 9月 2014 03:06:54 +0800 Subject: [PATCH] windows compile --- test/functional/volid_test.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/functional/volid_test.cpp b/test/functional/volid_test.cpp index 6aa87d1..b289af5 100644 --- a/test/functional/volid_test.cpp +++ b/test/functional/volid_test.cpp @@ -1,6 +1,6 @@ #define BOOST_TEST_MODULE standard_license_test //#define BOOST_TEST_MAIN -//#define BOOST_TEST_DYN_LINK +//#undef BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> #include <fstream> #include <cstring> @@ -11,7 +11,6 @@ #include "../../src/library/ini/SimpleIni.h" #include "generate-license.h" #include "../../src/library/pc-identifiers.h" -#include <dbus-1.0/dbus/dbus.h> namespace fs = boost::filesystem; using namespace license; @@ -47,7 +46,7 @@ for (int i = 0; i < num_strategies; i++) { FUNCTION_RETURN generate_ok = generate_user_pc_signature(identifier_out, strategies[i]); - BOOST_ASSERT(generate_ok == FUNCTION_RETURN::FUNC_RET_OK); + BOOST_ASSERT(generate_ok == FUNC_RET_OK); idfile << identifier_out << endl; } idfile.close(); @@ -56,10 +55,10 @@ BOOST_AUTO_TEST_CASE(generated_identifiers_stability) { const string idfileLocation(PROJECT_TEST_TEMP_DIR "/identifiers_file"); IDENTIFICATION_STRATEGY strategies[] = - { IDENTIFICATION_STRATEGY::DEFAULT, - IDENTIFICATION_STRATEGY::DISK_LABEL, - IDENTIFICATION_STRATEGY::DISK_NUM, - IDENTIFICATION_STRATEGY::ETHERNET }; + { DEFAULT, + DISK_LABEL, + DISK_NUM, + ETHERNET }; const int num_strategies = sizeof(strategies) / sizeof(strategies[0]); std::ifstream test_idfile_exist(idfileLocation); if (!test_idfile_exist.good()) { @@ -77,7 +76,7 @@ BOOST_ASSERT(generate_ok == FUNCTION_RETURN::FUNC_RET_OK); if (reference_signatures[i] != generated_identifier) { string message = string("pc signature compare fail: strategy:") - + to_string(strategies[i]) + " generated: [" + + to_string((long double) strategies[i]) + " generated: [" + generated_identifier + "] reference: [" + reference_signatures[i] + "]"; BOOST_FAIL(message); -- Gitblit v1.9.1