From 1e166c13aaabe8d2aad1d604c77020a14dc577cd Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周二, 16 9月 2014 06:22:21 +0800
Subject: [PATCH] refactorings

---
 test/functional/volid_test.cpp |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/test/functional/volid_test.cpp b/test/functional/volid_test.cpp
index 6aa87d1..d6cff73 100644
--- a/test/functional/volid_test.cpp
+++ b/test/functional/volid_test.cpp
@@ -1,17 +1,16 @@
 #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>
-#include "../../../src/license-generator/license-generator.h"
+#include "../../../src/tools/license-generator/license-generator.h"
 #include "../../../src/library/api/license++.h"
 #include <build_properties.h>
 #include <boost/filesystem.hpp>
 #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