61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// (c) Copyright, Ubisoft Entertainment Inc. || Created by Harbour //
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
#include "tests/config.h"
|
|
#include "tests/common/helpers.h"
|
|
#include <../private/ubiservices/core/types/stringStream.h>
|
|
#include <../private/ubiservices/core/helpers/streamOperators.h>
|
|
#include <ubiservices/services/http/request/httpRequest.h>
|
|
#include <ubiservices/services/http/httpResponse.h>
|
|
|
|
#if defined(US_TARGET_XONE)
|
|
extern Windows::UI::Core::CoreWindow^ getCoreWindow();
|
|
#endif
|
|
|
|
TEST(CONFIG, LOCAL_PRINTF)
|
|
{
|
|
PRINTF("Printing text #1 %s\n", "OK");
|
|
PRINTF("Printing text #2 %s\n", "OK");
|
|
|
|
PRINT_LINE("Printing line #1 %s", "OK");
|
|
PRINT_LINE("Printing line #2 %s", "OK");
|
|
|
|
PRINT_PROGRESS(0, 5, "0/5");
|
|
PRINT_PROGRESS(1, 5, "1/5");
|
|
PRINT_PROGRESS(2, 5, "2/5");
|
|
PRINT_PROGRESS(3, 5, "3/5");
|
|
PRINT_PROGRESS(4, 5, "4/5");
|
|
PRINT_PROGRESS(5, 5, "5/5");
|
|
}
|
|
|
|
// The following operators definition help in using the instances in Google test macros (EXPECT_EQ)
|
|
|
|
::std::ostream& operator<<(::std::ostream& stream, const US_NS::Guid& source)
|
|
{
|
|
return stream << static_cast<const US_NS::String&>(source);
|
|
}
|
|
|
|
::std::ostream& operator<<(::std::ostream& stream, const US_NS::HttpHeader& source)
|
|
{
|
|
return stream << source.convertToString().getUtf8();
|
|
}
|
|
|
|
::std::ostream& operator<<(::std::ostream& stream, const US_NS::HttpRequest& source)
|
|
{
|
|
return stream << US_STREAM_CSTR(source);
|
|
}
|
|
|
|
::std::ostream& operator<<(::std::ostream& stream, const US_NS::HttpResponse& source)
|
|
{
|
|
return stream << US_STREAM_CSTR(source);
|
|
}
|
|
|
|
US_TEST_NS::ScopedInit::ScopedInit()
|
|
{
|
|
US_NS::initializeSdk();
|
|
}
|
|
|
|
US_TEST_NS::ScopedInit::~ScopedInit()
|
|
{
|
|
Helper::uninitializeSdk();
|
|
}
|