From 8553a8d63f97cfa8d64b5b2260e81f8c896a8398 Mon Sep 17 00:00:00 2001 From: nancy.liao <huihui.liao@greentest.com.cn> Date: 周五, 23 5月 2025 18:36:03 +0800 Subject: [PATCH] 修改部分因为标准原因的报错 --- test/functional/generate-license.cpp | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/functional/generate-license.cpp b/test/functional/generate-license.cpp index 98cd979..d9b65f0 100644 --- a/test/functional/generate-license.cpp +++ b/test/functional/generate-license.cpp @@ -13,11 +13,13 @@ #include <iostream> #include <licensecc_properties_test.h> +#include <licensecc_properties.h> -#include "../../src/library/base/base.h" +#include"licensecc/licensecc.h" #include "../../src/library/ini/SimpleIni.h" #include "generate-license.h" +#include "../src/library/base/file_utils.hpp" namespace fs = boost::filesystem; using namespace std; @@ -42,17 +44,17 @@ ss << " --" PARAM_LICENSE_OUTPUT " " << license_fname_s; ss << " --" PARAM_PROJECT_FOLDER " " << LCC_TEST_LICENSES_PROJECT; - for (int i = 0; i < other_args.size(); i++) { + for (size_t i = 0; i < other_args.size(); i++) { ss << " " << other_args[i]; } cout << "executing :" << ss.str() << endl; const int retCode = std::system(ss.str().c_str()); - BOOST_CHECK_EQUAL(retCode, 0); - BOOST_ASSERT(fs::exists(license_fname)); + BOOST_REQUIRE_EQUAL(retCode, 0); + BOOST_REQUIRE_MESSAGE(fs::exists(license_fname), "license exists"); CSimpleIniA ini; const SI_Error rc = ini.LoadFile(license_fname.c_str()); - BOOST_CHECK_GE(rc, 0); - const int sectionSize = ini.GetSectionSize("DEFAULT"); + BOOST_REQUIRE_GE(rc, 0); + const int sectionSize = ini.GetSectionSize(LCC_PROJECT_NAME); BOOST_CHECK_GT(sectionSize, 0); return license_fname.string(); } -- Gitblit v1.9.1