#include "stdafx.h"
#define BOOST_TEST_MODULE "Testing XmlCheck with PugiXml"
#include <boost/bind.hpp>
#include <boost/test/auto_unit_test.hpp>
#define BOOST_LIB_NAME boost_unit_test_framework
#include <boost/config/auto_link.hpp>
#include "TestToolBox\TestToolBoxImpl.h"
TTB_TRC_DEF_GLOBALS("TestXmlCheckWithPugiXmlc", TL_VAL_DEBUG);
namespace TTB = TestToolBox;
#include "MyTestCommands.h"
#include <assert.h>
#include <iostream>
using namespace std;
void InitialPreparation();
struct MyGlobalSettingsForTestToolBox : public TTB::DefaultSettingsForBoostAndTTB
{
MyGlobalSettingsForTestToolBox(void)
{
std::string prefixForTestEventsWithinOutFile =
TTB::TheEnvironment()->GetCommandLineOption("-prefixEvents");
bool detailedLog = true;
TTB::TestEvents::Get()->SetDetailedLog(
detailedLog, prefixForTestEventsWithinOutFile);
InitialPreparation();
}
};
BOOST_GLOBAL_FIXTURE(MyGlobalSettingsForTestToolBox);
BOOST_AUTO_TEST_CASE(EmptyTestcaseToShowOriginalBoostTestCase)
{
bool someCondition = false;
double pi = 3.14159265359;
TTB_OUT_S("This macro supports stream syntax x=" << std::setprecision(4) << pi
<< " condition=" << std::boolalpha << someCondition);
TTB_OUT_S("With default settings the output goes to .out + .rpt + stdout");
TTB::TheProtocol()->SelectTargetsForOutS(TTB::OutputMode::M_STDOUT);
TTB_OUT_S("After change of default settings this message goes only to stdout");
TTB::TheProtocol()->SelectTargetsForOutS(TTB::OutputMode::M_STDOUT | TTB::OutputMode::M_OUTFILE);
TTB_OUT_S("After another change of settings this message goes to .out + stdout");
TTB_T_OUT_S(TTB::OutputMode::M_STDOUT, "This message with explicit target goes to stdout");
TTB_T_OUT_S(TTB::OutputMode::M_OUTFILE| TTB::OutputMode::M_RPTFILE,
"This message with explicit targets goes to .out + .rpt");
TTB::TheProtocol()->SetVerbosityForOutS(TTB::OutputLevel::eVERBOUS);
TTB::TheProtocol()->SelectTargetsForOutS(TTB::OutputMode::M_STDOUT | TTB::OutputMode::M_OUTFILE | TTB::OutputMode::M_RPTFILE);
TTB_OUT_S("This verbous message goes to nowhere");
TTB::TheProtocol()->SetVerbosityForOutS(TTB::OutputLevel::eREGULAR);
TTB_OUT_S("And this regular message goes to out + rpt + stdout");
}