From e0192d29a4fbeb668eb2a35be0f46e2676c9d045 Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周日, 08 12月 2019 18:40:59 +0800 Subject: [PATCH] fix possible return value --- test/library/LicenseReader_test.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/library/LicenseReader_test.cpp b/test/library/LicenseReader_test.cpp index b064acc..e0d32aa 100644 --- a/test/library/LicenseReader_test.cpp +++ b/test/library/LicenseReader_test.cpp @@ -7,8 +7,8 @@ #include <licensecc_properties.h> #include <licensecc_properties_test.h> +#include <licensecc/datatypes.h> -#include "../../src/library/api/datatypes.h" #include "../../src/library/base/EventRegistry.h" #include "../../src/library/os/os.h" #include "../../src/library/LicenseReader.hpp" @@ -73,7 +73,9 @@ BOOST_CHECK(!registry.isGood()); BOOST_CHECK_EQUAL(0, licenseInfos.size()); BOOST_ASSERT(registry.getLastFailure() != NULL); - BOOST_CHECK_EQUAL(ENVIRONMENT_VARIABLE_NOT_DEFINED, registry.getLastFailure()->event_type); + BOOST_CHECK_MESSAGE((ENVIRONMENT_VARIABLE_NOT_DEFINED == registry.getLastFailure()->event_type) || + (LICENSE_FILE_NOT_FOUND == registry.getLastFailure()->event_type), + "error as expected"); } /** -- Gitblit v1.9.1