From 483c73630a82fe8fbe9fe74cc8bbdd23a13d8b6b Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 15 2月 2020 23:49:50 +0800 Subject: [PATCH] pc identifiers work --- test/functional/date_test.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/functional/date_test.cpp b/test/functional/date_test.cpp index 15fbdd0..999331c 100644 --- a/test/functional/date_test.cpp +++ b/test/functional/date_test.cpp @@ -24,10 +24,10 @@ const string licLocation = generate_license("not_expired.lic", extraArgs); /* */ LicenseInfo license; - LicenseLocation licenseLocation; - licenseLocation.licenseFileLocation = licLocation.c_str(); - licenseLocation.licenseData = ""; - const EVENT_TYPE result = acquire_license(nullptr, &licenseLocation, &license); + LicenseLocation location = {LICENSE_PATH}; + std::copy(licLocation.begin(), licLocation.end(), location.licenseData); + + const LCC_EVENT_TYPE result = acquire_license(nullptr, &location, &license); BOOST_CHECK_EQUAL(result, LICENSE_OK); BOOST_CHECK_EQUAL(license.has_expiry, true); BOOST_CHECK_EQUAL(license.linked_to_pc, false); @@ -41,11 +41,10 @@ const string licLocation = generate_license("expired", extraArgs); /* */ LicenseInfo license; - LicenseLocation licenseLocation; - licenseLocation.licenseFileLocation = licLocation.c_str(); - licenseLocation.licenseData = nullptr; + LicenseLocation location = {LICENSE_PATH}; + std::copy(licLocation.begin(), licLocation.end(), location.licenseData); BOOST_TEST_MESSAGE("before acquire license"); - const EVENT_TYPE result = acquire_license(nullptr, &licenseLocation, &license); + const LCC_EVENT_TYPE result = acquire_license(nullptr, &location, &license); BOOST_CHECK_EQUAL(result, PRODUCT_EXPIRED); BOOST_CHECK_EQUAL(license.has_expiry, true); BOOST_CHECK_EQUAL(license.linked_to_pc, false); -- Gitblit v1.9.1