-/*
- * Copyright (c) 2000-2019 Samsung Electronics Co., Ltd. All rights reserved
+ /*
+ * Copyright (c) 2015-2020 Samsung Electronics Co., Ltd. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <cmath>
#include <vector>
-#include <boost/test/unit_test.hpp>
+#include <boost_macros_wrapper.h>
#include <parser.h>
using namespace CKM;
BOOST_AUTO_TEST_SUITE(XML_PARSER_TEST)
-BOOST_AUTO_TEST_CASE(XmlParserTest_wrong_argument)
+NEGATIVE_TEST_CASE(XmlParserTest_wrong_argument)
{
std::string emptyPath;
XML::Parser parser(emptyPath);
BOOST_REQUIRE(Parser::ErrorCode::ERROR_XML_PARSE_FAILED == parser.Parse());
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_no_XML_file)
+NEGATIVE_TEST_CASE(XmlParserTest_no_XML_file)
{
XML::Parser parser(format_test_path("i-am-not-here").c_str());
BOOST_REQUIRE(Parser::ErrorCode::ERROR_XML_VALIDATION_FAILED == parser.Validate(
format_test_path(XSD_1_okay).c_str()));
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML1_correct_verify)
+POSITIVE_TEST_CASE(XmlParserTest_XML1_correct_verify)
{
XML::Parser parser(format_test_path(XML_1_okay).c_str());
BOOST_REQUIRE(0 == parser.Validate(format_test_path(XSD_1_okay).c_str()));
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML1_wrong_verify)
+NEGATIVE_TEST_CASE(XmlParserTest_XML1_wrong_verify)
{
XML::Parser parser(format_test_path(XML_1_wrong).c_str());
BOOST_REQUIRE(Parser::ErrorCode::ERROR_XML_VALIDATION_FAILED == parser.Validate(
format_test_path(XSD_1_okay).c_str()));
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML1_wrong_schema)
+NEGATIVE_TEST_CASE(XmlParserTest_XML1_wrong_schema)
{
XML::Parser parser(format_test_path(XML_1_okay).c_str());
BOOST_REQUIRE(Parser::ErrorCode::ERROR_XSD_PARSE_FAILED == parser.Validate(
format_test_path(XSD_1_wrong).c_str()));
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML1_correct_parse_incorrect_callbacks)
+NEGATIVE_TEST_CASE(XmlParserTest_XML1_correct_parse_incorrect_callbacks)
{
XML::Parser parser(format_test_path(XML_1_okay).c_str());
BOOST_REQUIRE(0 == parser.Validate(format_test_path(XSD_1_okay).c_str()));
BOOST_REQUIRE(Parser::ErrorCode::PARSE_SUCCESS == parser.Parse());
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML1_correct_parse)
+POSITIVE_TEST_CASE(XmlParserTest_XML1_correct_parse)
{
XML::Parser parser(format_test_path(XML_1_okay).c_str());
BOOST_REQUIRE(0 == parser.Validate(format_test_path(XSD_1_okay).c_str()));
int m_expectedSum;
};
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML2_structure)
+POSITIVE_TEST_CASE(XmlParserTest_XML2_structure)
{
StructureTest parser(format_test_path(XML_2_structure).c_str());
BOOST_REQUIRE(0 == parser.Parse());
parser.getExpectedSum());
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML3_encrypted_correct_parse)
+POSITIVE_TEST_CASE(XmlParserTest_XML3_encrypted_correct_parse)
{
XML::Parser parser(format_test_path(XML_3_encrypted).c_str());
BOOST_REQUIRE(0 == parser.Validate(format_test_path(XSD_3_encrypted).c_str()));
BOOST_REQUIRE(endCallbackFlag == true);
}
-BOOST_AUTO_TEST_CASE(XmlParserTest_XML4_device_key_correct_parse)
+POSITIVE_TEST_CASE(XmlParserTest_XML4_device_key_correct_parse)
{
XML::Parser parser(format_test_path(XML_4_device_key).c_str());
BOOST_REQUIRE(0 == parser.Validate(format_test_path(XSD_4_device_key).c_str()));