THRIFT-5766 Replace std::endl with "\n"
Patch: Carel Combrink
This closes #2943
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index 77daf3d..5e0c894 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -51,7 +51,6 @@
using namespace thrift::test;
using std::cout;
-using std::endl;
using std::fixed;
using std::make_pair;
using std::map;
@@ -76,51 +75,51 @@
TestHandler() = default;
void testVoid() override {
- cout << "[C -> C++] testVoid()" << endl;
+ cout << "[C -> C++] testVoid()" << '\n';
}
void testString(string& out, const string &thing) override {
- cout << "[C -> C++] testString(\"" << thing << "\")" << endl;
+ cout << "[C -> C++] testString(\"" << thing << "\")" << '\n';
out = thing;
}
bool testBool(const bool thing) override {
- cout << "[C -> C++] testBool(" << (thing ? "true" : "false") << ")" << endl;
+ cout << "[C -> C++] testBool(" << (thing ? "true" : "false") << ")" << '\n';
return thing;
}
int8_t testByte(const int8_t thing) override {
- cout << "[C -> C++] testByte(" << (int)thing << ")" << endl;
+ cout << "[C -> C++] testByte(" << (int)thing << ")" << '\n';
return thing;
}
int32_t testI32(const int32_t thing) override {
- cout << "[C -> C++] testI32(" << thing << ")" << endl;
+ cout << "[C -> C++] testI32(" << thing << ")" << '\n';
return thing;
}
int64_t testI64(const int64_t thing) override {
- cout << "[C -> C++] testI64(" << thing << ")" << endl;
+ cout << "[C -> C++] testI64(" << thing << ")" << '\n';
return thing;
}
double testDouble(const double thing) override {
cout.precision(6);
- cout << "[C -> C++] testDouble(" << fixed << thing << ")" << endl;
+ cout << "[C -> C++] testDouble(" << fixed << thing << ")" << '\n';
return thing;
}
void testBinary(string& out, const string &thing) override {
- cout << "[C -> C++] testBinary(\"" << thing << "\")" << endl;
+ cout << "[C -> C++] testBinary(\"" << thing << "\")" << '\n';
out = thing;
}
void testStruct(Xtruct& out, const Xtruct &thing) override {
- cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << endl;
+ cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << '\n';
out = thing;
}
void testNest(Xtruct2& out, const Xtruct2& nest) override {
const Xtruct &thing = nest.struct_thing;
- cout << "[C -> C++] testNest({" << (int)nest.byte_thing << ", {\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "}, " << nest.i32_thing << "})" << endl;
+ cout << "[C -> C++] testNest({" << (int)nest.byte_thing << ", {\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "}, " << nest.i32_thing << "})" << '\n';
out = nest;
}
@@ -136,7 +135,7 @@
}
cout << m_iter->first << " => " << m_iter->second;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -152,7 +151,7 @@
}
cout << "\"" << m_iter->first << "\" => \"" << m_iter->second << "\"";
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -169,7 +168,7 @@
}
cout << *s_iter;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -185,21 +184,21 @@
}
cout << *l_iter;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
Numberz::type testEnum(const Numberz::type thing) override {
- cout << "[C -> C++] testEnum(" << thing << ")" << endl;
+ cout << "[C -> C++] testEnum(" << thing << ")" << '\n';
return thing;
}
UserId testTypedef(const UserId thing) override {
- cout << "[C -> C++] testTypedef(" << thing << ")" << endl;
+ cout << "[C -> C++] testTypedef(" << thing << ")" << '\n';
return thing; }
void testMapMap(map<int32_t, map<int32_t,int32_t> > &mapmap, const int32_t hello) override {
- cout << "[C -> C++] testMapMap(" << hello << ")" << endl;
+ cout << "[C -> C++] testMapMap(" << hello << ")" << '\n';
map<int32_t,int32_t> pos;
map<int32_t,int32_t> neg;
@@ -216,7 +215,7 @@
void testInsanity(map<UserId, map<Numberz::type,Insanity> > &insane, const Insanity &argument) override {
THRIFT_UNUSED_VARIABLE (argument);
- cout << "[C -> C++] testInsanity()" << endl;
+ cout << "[C -> C++] testInsanity()" << '\n';
Xtruct hello;
hello.string_thing = "Hello2";
@@ -278,7 +277,7 @@
}
cout << "}, ";
}
- cout << "}" << endl;
+ cout << "}" << '\n';
}
@@ -288,7 +287,7 @@
THRIFT_UNUSED_VARIABLE (arg4);
THRIFT_UNUSED_VARIABLE (arg5);
- cout << "[C -> C++] testMulti()" << endl;
+ cout << "[C -> C++] testMulti()" << '\n';
hello.string_thing = "Hello2";
hello.byte_thing = arg0;
@@ -299,7 +298,7 @@
void testException(const std::string &arg)
noexcept(false) override
{
- cout << "[C -> C++] testException(" << arg << ")" << endl;
+ cout << "[C -> C++] testException(" << arg << ")" << '\n';
if (arg.compare("Xception") == 0) {
Xception e;
e.errorCode = 1001;
@@ -317,7 +316,7 @@
void testMultiException(Xtruct &result, const std::string &arg0, const std::string &arg1) noexcept(false) override {
- cout << "[C -> C++] testMultiException(" << arg0 << ", " << arg1 << ")" << endl;
+ cout << "[C -> C++] testMultiException(" << arg0 << ", " << arg1 << ")" << '\n';
if (arg0.compare("Xception") == 0) {
Xception e;
@@ -336,9 +335,9 @@
}
void testOneway(int sleepFor) override {
- cout << "testOneway(" << sleepFor << "): Sleeping..." << endl;
+ cout << "testOneway(" << sleepFor << "): Sleeping..." << '\n';
sleep(sleepFor);
- cout << "testOneway(" << sleepFor << "): done sleeping!" << endl;
+ cout << "testOneway(" << sleepFor << "): done sleeping!" << '\n';
}
};
diff --git a/lib/c_glib/test/testthrifttestzlibclient.cpp b/lib/c_glib/test/testthrifttestzlibclient.cpp
index 5c4b931..307fd4f 100644
--- a/lib/c_glib/test/testthrifttestzlibclient.cpp
+++ b/lib/c_glib/test/testthrifttestzlibclient.cpp
@@ -46,7 +46,6 @@
using namespace thrift::test;
using std::cout;
-using std::endl;
using std::fixed;
using std::make_pair;
using std::map;
@@ -71,51 +70,51 @@
TestHandler() = default;
void testVoid() override {
- cout << "[C -> C++] testVoid()" << endl;
+ cout << "[C -> C++] testVoid()" << '\n';
}
void testString(string& out, const string &thing) override {
- cout << "[C -> C++] testString(\"" << thing << "\")" << endl;
+ cout << "[C -> C++] testString(\"" << thing << "\")" << '\n';
out = thing;
}
bool testBool(const bool thing) override {
- cout << "[C -> C++] testBool(" << (thing ? "true" : "false") << ")" << endl;
+ cout << "[C -> C++] testBool(" << (thing ? "true" : "false") << ")" << '\n';
return thing;
}
int8_t testByte(const int8_t thing) override {
- cout << "[C -> C++] testByte(" << (int)thing << ")" << endl;
+ cout << "[C -> C++] testByte(" << (int)thing << ")" << '\n';
return thing;
}
int32_t testI32(const int32_t thing) override {
- cout << "[C -> C++] testI32(" << thing << ")" << endl;
+ cout << "[C -> C++] testI32(" << thing << ")" << '\n';
return thing;
}
int64_t testI64(const int64_t thing) override {
- cout << "[C -> C++] testI64(" << thing << ")" << endl;
+ cout << "[C -> C++] testI64(" << thing << ")" << '\n';
return thing;
}
double testDouble(const double thing) override {
cout.precision(6);
- cout << "[C -> C++] testDouble(" << fixed << thing << ")" << endl;
+ cout << "[C -> C++] testDouble(" << fixed << thing << ")" << '\n';
return thing;
}
void testBinary(string& out, const string &thing) override {
- cout << "[C -> C++] testBinary(\"" << thing << "\")" << endl;
+ cout << "[C -> C++] testBinary(\"" << thing << "\")" << '\n';
out = thing;
}
void testStruct(Xtruct& out, const Xtruct &thing) override {
- cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << endl;
+ cout << "[C -> C++] testStruct({\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "})" << '\n';
out = thing;
}
void testNest(Xtruct2& out, const Xtruct2& nest) override {
const Xtruct &thing = nest.struct_thing;
- cout << "[C -> C++] testNest({" << (int)nest.byte_thing << ", {\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "}, " << nest.i32_thing << "})" << endl;
+ cout << "[C -> C++] testNest({" << (int)nest.byte_thing << ", {\"" << thing.string_thing << "\", " << (int)thing.byte_thing << ", " << thing.i32_thing << ", " << thing.i64_thing << "}, " << nest.i32_thing << "})" << '\n';
out = nest;
}
@@ -131,7 +130,7 @@
}
cout << m_iter->first << " => " << m_iter->second;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -147,7 +146,7 @@
}
cout << "\"" << m_iter->first << "\" => \"" << m_iter->second << "\"";
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -164,7 +163,7 @@
}
cout << *s_iter;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
@@ -180,21 +179,21 @@
}
cout << *l_iter;
}
- cout << "})" << endl;
+ cout << "})" << '\n';
out = thing;
}
Numberz::type testEnum(const Numberz::type thing) override {
- cout << "[C -> C++] testEnum(" << thing << ")" << endl;
+ cout << "[C -> C++] testEnum(" << thing << ")" << '\n';
return thing;
}
UserId testTypedef(const UserId thing) override {
- cout << "[C -> C++] testTypedef(" << thing << ")" << endl;
+ cout << "[C -> C++] testTypedef(" << thing << ")" << '\n';
return thing; }
void testMapMap(map<int32_t, map<int32_t,int32_t> > &mapmap, const int32_t hello) override {
- cout << "[C -> C++] testMapMap(" << hello << ")" << endl;
+ cout << "[C -> C++] testMapMap(" << hello << ")" << '\n';
map<int32_t,int32_t> pos;
map<int32_t,int32_t> neg;
@@ -211,7 +210,7 @@
void testInsanity(map<UserId, map<Numberz::type,Insanity> > &insane, const Insanity &argument) override {
THRIFT_UNUSED_VARIABLE (argument);
- cout << "[C -> C++] testInsanity()" << endl;
+ cout << "[C -> C++] testInsanity()" << '\n';
Xtruct hello;
hello.string_thing = "Hello2";
@@ -273,7 +272,7 @@
}
cout << "}, ";
}
- cout << "}" << endl;
+ cout << "}" << '\n';
}
@@ -283,7 +282,7 @@
THRIFT_UNUSED_VARIABLE (arg4);
THRIFT_UNUSED_VARIABLE (arg5);
- cout << "[C -> C++] testMulti()" << endl;
+ cout << "[C -> C++] testMulti()" << '\n';
hello.string_thing = "Hello2";
hello.byte_thing = arg0;
@@ -294,7 +293,7 @@
void testException(const std::string &arg)
throw(Xception, apache::thrift::TException) override
{
- cout << "[C -> C++] testException(" << arg << ")" << endl;
+ cout << "[C -> C++] testException(" << arg << ")" << '\n';
if (arg.compare("Xception") == 0) {
Xception e;
e.errorCode = 1001;
@@ -312,7 +311,7 @@
void testMultiException(Xtruct &result, const std::string &arg0, const std::string &arg1) throw(Xception, Xception2) override {
- cout << "[C -> C++] testMultiException(" << arg0 << ", " << arg1 << ")" << endl;
+ cout << "[C -> C++] testMultiException(" << arg0 << ", " << arg1 << ")" << '\n';
if (arg0.compare("Xception") == 0) {
Xception e;
@@ -331,9 +330,9 @@
}
void testOneway(int sleepFor) override {
- cout << "testOneway(" << sleepFor << "): Sleeping..." << endl;
+ cout << "testOneway(" << sleepFor << "): Sleeping..." << '\n';
sleep(sleepFor);
- cout << "testOneway(" << sleepFor << "): done sleeping!" << endl;
+ cout << "testOneway(" << sleepFor << "): done sleeping!" << '\n';
}
};
diff --git a/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
index 7656596..43d4034 100644
--- a/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
+++ b/lib/cpp/src/thrift/async/TEvhttpClientChannel.cpp
@@ -147,8 +147,7 @@
self->finish(req);
} catch (std::exception& e) {
// don't propagate a C++ exception in C code (e.g. libevent)
- std::cerr << "TEvhttpClientChannel::response exception thrown (ignored): " << e.what()
- << std::endl;
+ std::cerr << "TEvhttpClientChannel::response exception thrown (ignored): " << e.what() << '\n';
}
}
}
diff --git a/lib/cpp/src/thrift/async/TEvhttpServer.cpp b/lib/cpp/src/thrift/async/TEvhttpServer.cpp
index 7d2cf21..bea9001 100644
--- a/lib/cpp/src/thrift/async/TEvhttpServer.cpp
+++ b/lib/cpp/src/thrift/async/TEvhttpServer.cpp
@@ -127,13 +127,13 @@
int rv = evhttp_add_header(ctx->req->output_headers, "Content-Type", "application/x-thrift");
if (rv != 0) {
// TODO: Log an error.
- std::cerr << "evhttp_add_header failed " << __FILE__ << ":" << __LINE__ << std::endl;
+ std::cerr << "evhttp_add_header failed " << __FILE__ << ":" << __LINE__ << '\n';
}
struct evbuffer* buf = evbuffer_new();
if (buf == nullptr) {
// TODO: Log an error.
- std::cerr << "evbuffer_new failed " << __FILE__ << ":" << __LINE__ << std::endl;
+ std::cerr << "evbuffer_new failed " << __FILE__ << ":" << __LINE__ << '\n';
} else {
uint8_t* obuf;
uint32_t sz;
@@ -141,8 +141,7 @@
int ret = evbuffer_add(buf, obuf, sz);
if (ret != 0) {
// TODO: Log an error.
- std::cerr << "evhttp_add failed with " << ret << " " << __FILE__ << ":" << __LINE__
- << std::endl;
+ std::cerr << "evhttp_add failed with " << ret << " " << __FILE__ << ":" << __LINE__ << '\n';
}
}
diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp b/lib/cpp/src/thrift/transport/TFileTransport.cpp
index dd7d229..3f4d812 100644
--- a/lib/cpp/src/thrift/transport/TFileTransport.cpp
+++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp
@@ -55,8 +55,6 @@
using std::shared_ptr;
using std::cerr;
-using std::cout;
-using std::endl;
using std::string;
using namespace apache::thrift::protocol;
using namespace apache::thrift::concurrency;
@@ -1032,7 +1030,7 @@
break;
}
} catch (TException& te) {
- cerr << te.what() << endl;
+ cerr << te.what() << '\n';
break;
}
}
@@ -1060,7 +1058,7 @@
} catch (TEOFException&) {
break;
} catch (TException& te) {
- cerr << te.what() << endl;
+ cerr << te.what() << '\n';
break;
}
}
diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp
index 97a5317..ba8c345 100644
--- a/lib/cpp/test/Benchmark.cpp
+++ b/lib/cpp/test/Benchmark.cpp
@@ -53,7 +53,6 @@
using namespace apache::thrift::transport;
using namespace apache::thrift::protocol;
using std::cout;
- using std::endl;
OneOfEach ooe;
ooe.im_true = true;
@@ -84,7 +83,7 @@
ooe.write(&prot);
}
elapsed = timer.frame();
- cout << "Write big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Write big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
buf->getBuffer(&data, &datasize);
@@ -100,7 +99,7 @@
ooe2.read(&prot);
}
elapsed = timer.frame();
- cout << " Read big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Read big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -113,7 +112,7 @@
ooe.write(&prot);
}
elapsed = timer.frame();
- cout << "Write little endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Write little endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -127,7 +126,7 @@
ooe2.read(&prot);
}
elapsed = timer.frame();
- cout << " Read little endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Read little endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -140,7 +139,7 @@
ooe.write(&prot);
}
elapsed = timer.frame();
- cout << "Write big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Write big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -154,7 +153,7 @@
ooe2.read(&prot);
}
elapsed = timer.frame();
- cout << " Read big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Read big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
@@ -177,7 +176,7 @@
listDoublePerf.write(&prot);
elapsed = timer.frame();
- cout << "Double write big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Double write big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
buf->getBuffer(&data, &datasize);
@@ -191,7 +190,7 @@
listDoublePerf2.read(&prot);
elapsed = timer.frame();
- cout << " Double read big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Double read big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -202,7 +201,7 @@
listDoublePerf.write(&prot);
elapsed = timer.frame();
- cout << "Double write little endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Double write little endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -214,7 +213,7 @@
listDoublePerf2.read(&prot);
elapsed = timer.frame();
- cout << " Double read little endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Double read little endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -225,7 +224,7 @@
listDoublePerf.write(&prot);
elapsed = timer.frame();
- cout << "Double write big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << "Double write big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
{
@@ -237,7 +236,7 @@
listDoublePerf2.read(&prot);
elapsed = timer.frame();
- cout << " Double read big endian: " << num / (1000 * elapsed) << " kHz" << endl;
+ cout << " Double read big endian: " << num / (1000 * elapsed) << " kHz" << '\n';
}
diff --git a/lib/cpp/test/OneWayHTTPTest.cpp b/lib/cpp/test/OneWayHTTPTest.cpp
index 7823482..8789c2c 100644
--- a/lib/cpp/test/OneWayHTTPTest.cpp
+++ b/lib/cpp/test/OneWayHTTPTest.cpp
@@ -55,9 +55,6 @@
using apache::thrift::transport::TSocket;
using apache::thrift::transport::TTransportException;
using std::shared_ptr;
-using std::cout;
-using std::cerr;
-using std::endl;
using std::string;
namespace utf = boost::unit_test;
@@ -70,12 +67,12 @@
void roundTripRPC() override {
#ifdef ENABLE_STDERR_LOGGING
- cerr << "roundTripRPC()" << endl;
+ cerr << "roundTripRPC()" << '\n';
#endif
}
void oneWayRPC() override {
#ifdef ENABLE_STDERR_LOGGING
- cerr << "oneWayRPC()" << std::endl ;
+ cerr << "oneWayRPC()" << '\n';
#endif
}
};
@@ -201,7 +198,7 @@
int port = ss->getPort() ;
#ifdef ENABLE_STDERR_LOGGING
- cerr << "port " << port << endl ;
+ cerr << "port " << port << '\n';
#endif
{
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index 2f1aea6..53e5d15 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -36,8 +36,6 @@
using apache::thrift::transport::TMemoryBuffer;
using apache::thrift::transport::TTransportException;
using std::shared_ptr;
-using std::cout;
-using std::endl;
using std::string;
BOOST_AUTO_TEST_CASE(test_read_write_grow) {
diff --git a/lib/cpp/test/TServerSocketTest.cpp b/lib/cpp/test/TServerSocketTest.cpp
index 929defa..0860242 100644
--- a/lib/cpp/test/TServerSocketTest.cpp
+++ b/lib/cpp/test/TServerSocketTest.cpp
@@ -43,7 +43,7 @@
accepted->close();
sock1.close();
- std::cout << "An error message from getaddrinfo on the console is expected:" << std::endl;
+ std::cout << "An error message from getaddrinfo on the console is expected:" << '\n';
TServerSocket sock2("257.258.259.260", 0);
BOOST_CHECK_THROW(sock2.listen(), TTransportException);
sock2.close();
diff --git a/lib/cpp/test/ThrifttReadCheckTests.cpp b/lib/cpp/test/ThrifttReadCheckTests.cpp
index eb4ca01..481185e 100644
--- a/lib/cpp/test/ThrifttReadCheckTests.cpp
+++ b/lib/cpp/test/ThrifttReadCheckTests.cpp
@@ -55,8 +55,6 @@
using apache::thrift::transport::TBufferedTransport;
using apache::thrift::transport::TFramedTransport;
using std::shared_ptr;
-using std::cout;
-using std::endl;
using std::string;
using std::memset;
using namespace apache::thrift;
diff --git a/lib/cpp/test/concurrency/Tests.cpp b/lib/cpp/test/concurrency/Tests.cpp
index 45054a9..67de789 100644
--- a/lib/cpp/test/concurrency/Tests.cpp
+++ b/lib/cpp/test/concurrency/Tests.cpp
@@ -51,52 +51,52 @@
ThreadFactoryTests threadFactoryTests;
- std::cout << "ThreadFactory tests..." << std::endl;
+ std::cout << "ThreadFactory tests..." << '\n';
const int reapLoops = 2 * WEIGHT;
const int reapCount = 100 * WEIGHT;
const size_t floodLoops = 3;
const size_t floodCount = 500 * WEIGHT;
- std::cout << "\t\tThreadFactory reap N threads test: N = " << reapLoops << "x" << reapCount << std::endl;
+ std::cout << "\t\tThreadFactory reap N threads test: N = " << reapLoops << "x" << reapCount << '\n';
if (!threadFactoryTests.reapNThreads(reapLoops, reapCount)) {
- std::cerr << "\t\ttThreadFactory reap N threads FAILED" << std::endl;
+ std::cerr << "\t\ttThreadFactory reap N threads FAILED" << '\n';
return 1;
}
- std::cout << "\t\tThreadFactory flood N threads test: N = " << floodLoops << "x" << floodCount << std::endl;
+ std::cout << "\t\tThreadFactory flood N threads test: N = " << floodLoops << "x" << floodCount << '\n';
if (!threadFactoryTests.floodNTest(floodLoops, floodCount)) {
- std::cerr << "\t\ttThreadFactory flood N threads FAILED" << std::endl;
+ std::cerr << "\t\ttThreadFactory flood N threads FAILED" << '\n';
return 1;
}
- std::cout << "\t\tThreadFactory synchronous start test" << std::endl;
+ std::cout << "\t\tThreadFactory synchronous start test" << '\n';
if (!threadFactoryTests.synchStartTest()) {
- std::cerr << "\t\ttThreadFactory synchronous start FAILED" << std::endl;
+ std::cerr << "\t\ttThreadFactory synchronous start FAILED" << '\n';
return 1;
}
- std::cout << "\t\tThreadFactory monitor timeout test" << std::endl;
+ std::cout << "\t\tThreadFactory monitor timeout test" << '\n';
if (!threadFactoryTests.monitorTimeoutTest()) {
- std::cerr << "\t\ttThreadFactory monitor timeout FAILED" << std::endl;
+ std::cerr << "\t\ttThreadFactory monitor timeout FAILED" << '\n';
return 1;
}
}
if (runAll || args[0].compare("util") == 0) {
- std::cout << "Util tests..." << std::endl;
+ std::cout << "Util tests..." << '\n';
- std::cout << "\t\tUtil minimum time" << std::endl;
+ std::cout << "\t\tUtil minimum time" << '\n';
int64_t time00 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
int64_t time01 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
- std::cout << "\t\t\tMinimum time: " << time01 - time00 << "ms" << std::endl;
+ std::cout << "\t\t\tMinimum time: " << time01 - time00 << "ms" << '\n';
time00 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
time01 = time00;
@@ -107,54 +107,54 @@
time01 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
}
- std::cout << "\t\t\tscall per ms: " << count / (time01 - time00) << std::endl;
+ std::cout << "\t\t\tscall per ms: " << count / (time01 - time00) << '\n';
}
if (runAll || args[0].compare("timer-manager") == 0) {
- std::cout << "TimerManager tests..." << std::endl;
+ std::cout << "TimerManager tests..." << '\n';
- std::cout << "\t\tTimerManager test00" << std::endl;
+ std::cout << "\t\tTimerManager test00" << '\n';
TimerManagerTests timerManagerTests;
if (!timerManagerTests.test00()) {
- std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ std::cerr << "\t\tTimerManager tests FAILED" << '\n';
return 1;
}
- std::cout << "\t\tTimerManager test01" << std::endl;
+ std::cout << "\t\tTimerManager test01" << '\n';
if (!timerManagerTests.test01()) {
- std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ std::cerr << "\t\tTimerManager tests FAILED" << '\n';
return 1;
}
- std::cout << "\t\tTimerManager test02" << std::endl;
+ std::cout << "\t\tTimerManager test02" << '\n';
if (!timerManagerTests.test02()) {
- std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ std::cerr << "\t\tTimerManager tests FAILED" << '\n';
return 1;
}
- std::cout << "\t\tTimerManager test03" << std::endl;
+ std::cout << "\t\tTimerManager test03" << '\n';
if (!timerManagerTests.test03()) {
- std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ std::cerr << "\t\tTimerManager tests FAILED" << '\n';
return 1;
}
- std::cout << "\t\tTimerManager test04" << std::endl;
+ std::cout << "\t\tTimerManager test04" << '\n';
if (!timerManagerTests.test04()) {
- std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ std::cerr << "\t\tTimerManager tests FAILED" << '\n';
return 1;
}
}
if (runAll || args[0].compare("thread-manager") == 0) {
- std::cout << "ThreadManager tests..." << std::endl;
+ std::cout << "ThreadManager tests..." << '\n';
{
size_t workerCount = 10 * WEIGHT;
@@ -163,26 +163,26 @@
ThreadManagerTests threadManagerTests;
- std::cout << "\t\tThreadManager api test:" << std::endl;
+ std::cout << "\t\tThreadManager api test:" << '\n';
if (!threadManagerTests.apiTest()) {
- std::cerr << "\t\tThreadManager apiTest FAILED" << std::endl;
+ std::cerr << "\t\tThreadManager apiTest FAILED" << '\n';
return 1;
}
std::cout << "\t\tThreadManager load test: worker count: " << workerCount
- << " task count: " << taskCount << " delay: " << delay << std::endl;
+ << " task count: " << taskCount << " delay: " << delay << '\n';
if (!threadManagerTests.loadTest(taskCount, delay, workerCount)) {
- std::cerr << "\t\tThreadManager loadTest FAILED" << std::endl;
+ std::cerr << "\t\tThreadManager loadTest FAILED" << '\n';
return 1;
}
std::cout << "\t\tThreadManager block test: worker count: " << workerCount
- << " delay: " << delay << std::endl;
+ << " delay: " << delay << '\n';
if (!threadManagerTests.blockTest(delay, workerCount)) {
- std::cerr << "\t\tThreadManager blockTest FAILED" << std::endl;
+ std::cerr << "\t\tThreadManager blockTest FAILED" << '\n';
return 1;
}
}
@@ -190,7 +190,7 @@
if (runAll || args[0].compare("thread-manager-benchmark") == 0) {
- std::cout << "ThreadManager benchmark tests..." << std::endl;
+ std::cout << "ThreadManager benchmark tests..." << '\n';
{
@@ -207,19 +207,19 @@
size_t taskCount = workerCount * tasksPerWorker;
std::cout << "\t\tThreadManager load test: worker count: " << workerCount
- << " task count: " << taskCount << " delay: " << delay << std::endl;
+ << " task count: " << taskCount << " delay: " << delay << '\n';
ThreadManagerTests threadManagerTests;
if (!threadManagerTests.loadTest(taskCount, delay, workerCount))
{
- std::cerr << "\t\tThreadManager loadTest FAILED" << std::endl;
+ std::cerr << "\t\tThreadManager loadTest FAILED" << '\n';
return 1;
}
}
}
}
- std::cout << "ALL TESTS PASSED" << std::endl;
+ std::cout << "ALL TESTS PASSED" << '\n';
return 0;
}
diff --git a/lib/cpp/test/concurrency/ThreadFactoryTests.h b/lib/cpp/test/concurrency/ThreadFactoryTests.h
index 23e46e3..a2d55fe 100644
--- a/lib/cpp/test/concurrency/ThreadFactoryTests.h
+++ b/lib/cpp/test/concurrency/ThreadFactoryTests.h
@@ -53,7 +53,7 @@
void run() override {
Synchronized s(_monitor);
-
+
if (--_count == 0) {
_monitor.notify();
}
@@ -82,7 +82,7 @@
threadFactory.newThread(shared_ptr<Runnable>(new ReapNTask(*monitor, activeCount))));
} catch (SystemResourceException& e) {
std::cout << "\t\t\tfailed to create " << lix* count + tix << " thread " << e.what()
- << std::endl;
+ << '\n';
throw;
}
}
@@ -96,7 +96,7 @@
(*thread)->start();
} catch (SystemResourceException& e) {
std::cout << "\t\t\tfailed to start " << lix* count + tix << " thread " << e.what()
- << std::endl;
+ << '\n';
throw;
}
}
@@ -107,11 +107,11 @@
monitor->wait(1000);
}
}
-
- std::cout << "\t\t\treaped " << lix* count << " threads" << std::endl;
+
+ std::cout << "\t\t\treaped " << lix* count << " threads" << '\n';
}
- std::cout << "\t\t\tSuccess!" << std::endl;
+ std::cout << "\t\t\tSuccess!" << '\n';
return true;
}
@@ -202,7 +202,7 @@
bool success = true;
- std::cout << "\t\t\t" << (success ? "Success" : "Failure") << "!" << std::endl;
+ std::cout << "\t\t\t" << (success ? "Success" : "Failure") << "!" << '\n';
return true;
}
@@ -239,7 +239,7 @@
std::cout << "\t\t\t" << (success ? "Success" : "Failure")
<< ": minimum required time to elapse " << count * timeout
<< "ms; actual elapsed time " << endTime - startTime << "ms"
- << std::endl;
+ << '\n';
return success;
}
@@ -250,14 +250,14 @@
~FloodTask() override {
if (_id % 10000 == 0) {
Synchronized sync(_mon);
- std::cout << "\t\tthread " << _id << " done" << std::endl;
+ std::cout << "\t\tthread " << _id << " done" << '\n';
}
}
void run() override {
if (_id % 10000 == 0) {
Synchronized sync(_mon);
- std::cout << "\t\tthread " << _id << " started" << std::endl;
+ std::cout << "\t\tthread " << _id << " started" << '\n';
}
}
const size_t _id;
@@ -270,7 +270,7 @@
bool success = false;
Monitor mon;
-
+
for (size_t lix = 0; lix < loop; lix++) {
ThreadFactory threadFactory = ThreadFactory();
@@ -287,14 +287,14 @@
} catch (TException& e) {
std::cout << "\t\t\tfailed to start " << lix* count + tix << " thread " << e.what()
- << std::endl;
+ << '\n';
return success;
}
}
Synchronized sync(mon);
- std::cout << "\t\t\tflooded " << (lix + 1) * count << " threads" << std::endl;
+ std::cout << "\t\t\tflooded " << (lix + 1) * count << " threads" << '\n';
success = true;
}
diff --git a/lib/cpp/test/concurrency/ThreadManagerTests.h b/lib/cpp/test/concurrency/ThreadManagerTests.h
index fee7c7c..b33fc27 100644
--- a/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -76,7 +76,7 @@
{
Synchronized s(_monitor);
- // std::cout << "Thread " << _count << " completed " << std::endl;
+ // std::cout << "Thread " << _count << " completed " << '\n';
_count--;
if (_count % 10000 == 0) {
@@ -131,13 +131,13 @@
threadManager->add(*ix);
}
- std::cout << "\t\t\t\tloaded " << count << " tasks to execute" << std::endl;
+ std::cout << "\t\t\t\tloaded " << count << " tasks to execute" << '\n';
{
Synchronized s(monitor);
while (activeCount > 0) {
- std::cout << "\t\t\t\tactiveCount = " << activeCount << std::endl;
+ std::cout << "\t\t\t\tactiveCount = " << activeCount << '\n';
monitor.wait();
}
}
@@ -184,13 +184,13 @@
std::cout << "\t\t\tfirst start: " << firstTime << " Last end: " << lastTime
<< " min: " << minTime << "ms max: " << maxTime << "ms average: " << averageTime
- << "ms" << std::endl;
+ << "ms" << '\n';
bool success = (time01 - time00) >= ((int64_t)count * timeout) / (int64_t)workerCount;
std::cout << "\t\t\t" << (success ? "Success" : "Failure")
<< "! expected time: " << ((int64_t)count * timeout) / (int64_t)workerCount << "ms elapsed time: " << time01 - time00
- << "ms" << std::endl;
+ << "ms" << '\n';
return success;
}
@@ -307,7 +307,7 @@
}
std::cout << "\t\t\t"
- << "Pending tasks " << threadManager->pendingTaskCount() << std::endl;
+ << "Pending tasks " << threadManager->pendingTaskCount() << '\n';
{
Synchronized s(blockMonitor);
@@ -323,18 +323,18 @@
}
std::cout << "\t\t\t"
- << "Pending tasks " << threadManager->pendingTaskCount() << std::endl;
+ << "Pending tasks " << threadManager->pendingTaskCount() << '\n';
try {
threadManager->add(extraTask, 1);
} catch (TimedOutException&) {
std::cout << "\t\t\t"
- << "add timed out unexpectedly" << std::endl;
+ << "add timed out unexpectedly" << '\n';
throw TException("Unexpected timeout adding task");
} catch (TooManyPendingTasksException&) {
std::cout << "\t\t\t"
- << "add encountered too many pending exepctions" << std::endl;
+ << "add encountered too many pending exepctions" << '\n';
throw TException("Unexpected timeout adding task");
}
@@ -375,10 +375,10 @@
}
} catch (TException& e) {
- std::cout << "ERROR: " << e.what() << std::endl;
+ std::cout << "ERROR: " << e.what() << '\n';
}
- std::cout << "\t\t\t" << (success ? "Success" : "Failure") << std::endl;
+ std::cout << "\t\t\t" << (success ? "Success" : "Failure") << '\n';
return success;
}
@@ -390,7 +390,7 @@
sleep_(100);
int64_t b = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
if (b - a < 50 || b - a > 150) {
- std::cerr << "\t\t\texpected 100ms gap, found " << (b-a) << "ms gap instead." << std::endl;
+ std::cerr << "\t\t\texpected 100ms gap, found " << (b-a) << "ms gap instead." << '\n';
return false;
}
@@ -403,18 +403,18 @@
shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(1);
threadManager->threadFactory(threadFactory);
- std::cout << "\t\t\t\tstarting.. " << std::endl;
+ std::cout << "\t\t\t\tstarting.. " << '\n';
threadManager->start();
threadManager->setExpireCallback(expiredNotifier); // std::bind(&ThreadManagerTests::expiredNotifier, this));
-#define EXPECT(FUNC, COUNT) { size_t c = FUNC; if (c != COUNT) { std::cerr << "expected " #FUNC" to be " #COUNT ", but was " << c << std::endl; return false; } }
+#define EXPECT(FUNC, COUNT) { size_t c = FUNC; if (c != COUNT) { std::cerr << "expected " #FUNC" to be " #COUNT ", but was " << c << '\n'; return false; } }
EXPECT(threadManager->workerCount(), 1);
EXPECT(threadManager->idleWorkerCount(), 1);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tadd 2nd worker.. " << std::endl;
+ std::cout << "\t\t\t\tadd 2nd worker.. " << '\n';
threadManager->addWorker();
@@ -422,7 +422,7 @@
EXPECT(threadManager->idleWorkerCount(), 2);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tremove 2nd worker.. " << std::endl;
+ std::cout << "\t\t\t\tremove 2nd worker.. " << '\n';
threadManager->removeWorker();
@@ -430,7 +430,7 @@
EXPECT(threadManager->idleWorkerCount(), 1);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tremove 1st worker.. " << std::endl;
+ std::cout << "\t\t\t\tremove 1st worker.. " << '\n';
threadManager->removeWorker();
@@ -438,7 +438,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tadd blocking task.. " << std::endl;
+ std::cout << "\t\t\t\tadd blocking task.. " << '\n';
// We're going to throw a blocking task into the mix
Monitor entryMonitor; // signaled when task is running
@@ -454,7 +454,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 1);
- std::cout << "\t\t\t\tadd other task.. " << std::endl;
+ std::cout << "\t\t\t\tadd other task.. " << '\n';
shared_ptr<ThreadManagerTests::Task> otherTask(
new ThreadManagerTests::Task(doneMonitor, activeCount, 0));
@@ -465,7 +465,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 2);
- std::cout << "\t\t\t\tremove blocking task specifically.. " << std::endl;
+ std::cout << "\t\t\t\tremove blocking task specifically.. " << '\n';
threadManager->remove(blockingTask);
@@ -473,11 +473,11 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 1);
- std::cout << "\t\t\t\tremove next pending task.." << std::endl;
+ std::cout << "\t\t\t\tremove next pending task.." << '\n';
shared_ptr<Runnable> nextTask = threadManager->removeNextPending();
if (nextTask != otherTask) {
- std::cerr << "\t\t\t\t\texpected removeNextPending to return otherTask" << std::endl;
+ std::cerr << "\t\t\t\t\texpected removeNextPending to return otherTask" << '\n';
return false;
}
@@ -485,15 +485,15 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tremove next pending task (none left).." << std::endl;
+ std::cout << "\t\t\t\tremove next pending task (none left).." << '\n';
nextTask = threadManager->removeNextPending();
if (nextTask) {
- std::cerr << "\t\t\t\t\texpected removeNextPending to return an empty Runnable" << std::endl;
+ std::cerr << "\t\t\t\t\texpected removeNextPending to return an empty Runnable" << '\n';
return false;
}
- std::cout << "\t\t\t\tadd 2 expired tasks and 1 not.." << std::endl;
+ std::cout << "\t\t\t\tadd 2 expired tasks and 1 not.." << '\n';
shared_ptr<ThreadManagerTests::Task> expiredTask(
new ThreadManagerTests::Task(doneMonitor, activeCount, 0));
@@ -509,28 +509,28 @@
EXPECT(threadManager->pendingTaskCount(), 3);
EXPECT(threadManager->expiredTaskCount(), 0);
- std::cout << "\t\t\t\tremove expired tasks.." << std::endl;
+ std::cout << "\t\t\t\tremove expired tasks.." << '\n';
if (!m_expired.empty()) {
- std::cerr << "\t\t\t\t\texpected m_expired to be empty" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired to be empty" << '\n';
return false;
}
threadManager->removeExpiredTasks();
if (m_expired.size() != 2) {
- std::cerr << "\t\t\t\t\texpected m_expired to be set" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired to be set" << '\n';
return false;
}
if (m_expired.front() != expiredTask) {
- std::cerr << "\t\t\t\t\texpected m_expired[0] to be the expired task" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired[0] to be the expired task" << '\n';
return false;
}
m_expired.pop_front();
if (m_expired.front() != expiredTask) {
- std::cerr << "\t\t\t\t\texpected m_expired[1] to be the expired task" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired[1] to be the expired task" << '\n';
return false;
}
@@ -543,23 +543,23 @@
EXPECT(threadManager->pendingTaskCount(), 0);
EXPECT(threadManager->expiredTaskCount(), 2);
- std::cout << "\t\t\t\tadd expired task (again).." << std::endl;
+ std::cout << "\t\t\t\tadd expired task (again).." << '\n';
threadManager->add(expiredTask, 0, 1); // expires in 1ms
sleep_(50); // make sure enough time elapses for it to expire - the shortest expiration time is 1ms
- std::cout << "\t\t\t\tadd worker to consume expired task.." << std::endl;
+ std::cout << "\t\t\t\tadd worker to consume expired task.." << '\n';
threadManager->addWorker();
sleep_(100); // make sure it has time to spin up and expire the task
if (m_expired.empty()) {
- std::cerr << "\t\t\t\t\texpected m_expired to be set" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired to be set" << '\n';
return false;
}
if (m_expired.front() != expiredTask) {
- std::cerr << "\t\t\t\t\texpected m_expired to be the expired task" << std::endl;
+ std::cerr << "\t\t\t\t\texpected m_expired to be the expired task" << '\n';
return false;
}
@@ -570,16 +570,16 @@
EXPECT(threadManager->pendingTaskCount(), 0);
EXPECT(threadManager->expiredTaskCount(), 3);
- std::cout << "\t\t\t\ttry to remove too many workers" << std::endl;
+ std::cout << "\t\t\t\ttry to remove too many workers" << '\n';
try {
threadManager->removeWorker(2);
- std::cerr << "\t\t\t\t\texpected InvalidArgumentException" << std::endl;
+ std::cerr << "\t\t\t\t\texpected InvalidArgumentException" << '\n';
return false;
} catch (const InvalidArgumentException&) {
/* expected */
}
- std::cout << "\t\t\t\tremove worker.. " << std::endl;
+ std::cout << "\t\t\t\tremove worker.. " << '\n';
threadManager->removeWorker();
@@ -588,7 +588,7 @@
EXPECT(threadManager->pendingTaskCount(), 0);
EXPECT(threadManager->expiredTaskCount(), 3);
- std::cout << "\t\t\t\tadd blocking task.. " << std::endl;
+ std::cout << "\t\t\t\tadd blocking task.. " << '\n';
threadManager->add(blockingTask);
@@ -596,7 +596,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 1);
- std::cout << "\t\t\t\tadd worker.. " << std::endl;
+ std::cout << "\t\t\t\tadd worker.. " << '\n';
threadManager->addWorker();
{
@@ -610,7 +610,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tunblock task and remove worker.. " << std::endl;
+ std::cout << "\t\t\t\tunblock task and remove worker.. " << '\n';
{
Synchronized s(blockMonitor);
@@ -623,7 +623,7 @@
EXPECT(threadManager->idleWorkerCount(), 0);
EXPECT(threadManager->pendingTaskCount(), 0);
- std::cout << "\t\t\t\tcleanup.. " << std::endl;
+ std::cout << "\t\t\t\tcleanup.. " << '\n';
blockingTask.reset();
threadManager.reset();
diff --git a/lib/cpp/test/concurrency/TimerManagerTests.h b/lib/cpp/test/concurrency/TimerManagerTests.h
index 2d1a262..9a53232 100644
--- a/lib/cpp/test/concurrency/TimerManagerTests.h
+++ b/lib/cpp/test/concurrency/TimerManagerTests.h
@@ -46,7 +46,7 @@
_success(false),
_done(false) {}
- ~Task() override { std::cerr << this << std::endl; }
+ ~Task() override { std::cerr << this << '\n'; }
void run() override {
@@ -84,7 +84,7 @@
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
if (timerManager.state() != TimerManager::STARTED) {
- std::cerr << "timerManager is not in the STARTED state, but should be" << std::endl;
+ std::cerr << "timerManager is not in the STARTED state, but should be" << '\n';
return false;
}
@@ -104,15 +104,15 @@
}
if (!task->_done) {
- std::cerr << "task is not done, but it should have executed" << std::endl;
+ std::cerr << "task is not done, but it should have executed" << '\n';
return false;
}
- std::cout << "\t\t\t" << (task->_success ? "Success" : "Failure") << "!" << std::endl;
+ std::cout << "\t\t\t" << (task->_success ? "Success" : "Failure") << "!" << '\n';
}
if (orphanTask->_done) {
- std::cerr << "orphan task is done, but it should not have executed" << std::endl;
+ std::cerr << "orphan task is done, but it should not have executed" << '\n';
return false;
}