Adds ktexttemplate as apt package to new_docker_build.sh and builds successfully
This commit is contained in:
39 files changed
+647
-208
No files matched your search
@@ -23,9 +23,9 @@ int main(int argc, char* argv[])
|
||||
return retCode;
|
||||
}
|
||||
|
||||
FunctionTopicTests::FunctionTopicTests() : m_mainThreadId(QThread::currentThreadId())
|
||||
.getNGLLogger("UnitTests.FunctionTopicTests")),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
FunctionTopicTests::FunctionTopicTests()
|
||||
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.FunctionTopicTests"))
|
||||
, m_mainThreadId(QThread::currentThreadId())
|
||||
{
|
||||
qRegisterMetaType<DdsUnitTests::FunctionReply>("DdsUnitTests::FunctionReply");
|
||||
qRegisterMetaType<DdsUnitTests::FunctionReplyWithState>("DdsUnitTests::FunctionReplyWithState");
|
||||
@@ -98,14 +98,14 @@ void FunctionTopicTests::requestWithState()
|
||||
|
||||
DdsUnitTests::FunctionRequestWithState data;
|
||||
|
||||
data.id(1);
|
||||
data.info(std::string("Test request"));
|
||||
data.value(1000.0);
|
||||
data.id = 1;
|
||||
data.info = std::string("Test request");
|
||||
data.value = 1000.0;
|
||||
|
||||
int uniqueId = 0;
|
||||
bool bRet = m_ftcWS->requestDataClassic(
|
||||
data, SLOT(slotRequestedData(DdsUnitTests::FunctionTopicTestWithStateReply, int, bool)),
|
||||
SLOT(slotRequestedDataError(int, int, int)), uniqueId);
|
||||
data, SLOT(slotRequestedData(DdsUnitTests::FunctionTopicTestWithStateReply,int,bool)),
|
||||
SLOT(slotRequestedDataError(int,int,int)), uniqueId);
|
||||
|
||||
QVERIFY2(bRet, "Could not request data!");
|
||||
|
||||
@@ -123,14 +123,14 @@ void FunctionTopicTests::requestTestCase2()
|
||||
|
||||
DdsUnitTests::FunctionRequest data;
|
||||
|
||||
data.id(1);
|
||||
data.info(std::string("Test request"));
|
||||
data.value(1000.0);
|
||||
data.id = 1;
|
||||
data.info = std::string("Test request");
|
||||
data.value = 1000.0;
|
||||
|
||||
int uniqueId = 0;
|
||||
bool bRet =
|
||||
m_ftc->requestDataClassic(data, SLOT(slotRequestedData(DdsUnitTests::FunctionTopicTestReply, int, bool)),
|
||||
SLOT(slotRequestedDataError(int, int, int)), uniqueId);
|
||||
m_ftc->requestDataClassic(data, SLOT(slotRequestedData(DdsUnitTests::FunctionTopicTestReply,int,bool)),
|
||||
SLOT(slotRequestedDataError(int,int,int)), uniqueId);
|
||||
|
||||
QVERIFY2(bRet, "Could not request data!");
|
||||
|
||||
@@ -157,16 +157,16 @@ void FunctionTopicTests::onFunctionTopicRequest(const rti::core::SampleIdentity&
|
||||
|
||||
INFO_LOG(m_logger) << "Got function topic request (with status member)";
|
||||
m_requestTopicWithState = request;
|
||||
QCOMPARE(m_requestTopicWithState.id(), 1);
|
||||
QCOMPARE(m_requestTopicWithState.info().get(), std::string("Test request"));
|
||||
QCOMPARE(m_requestTopicWithState.value(), 1000.0);
|
||||
QCOMPARE(m_requestTopicWithState.id, 1);
|
||||
QCOMPARE(m_requestTopicWithState.info.get(), std::string("Test request"));
|
||||
QCOMPARE(m_requestTopicWithState.value, 1000.0);
|
||||
|
||||
DdsUnitTests::FunctionReplyWithState reply;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Send sample with status REPLY_COMPLETED";
|
||||
reply.id(1);
|
||||
reply.errorString("Hello");
|
||||
reply.replyState(Core::FtReplyState::Completed);
|
||||
reply.id = 1;
|
||||
reply.errorString = "Hello";
|
||||
reply.replyState = Core::FtReplyState::Completed;
|
||||
|
||||
bool bRet = m_ftsWS->sendReply(sampleId, reply);
|
||||
QVERIFY2(bRet, "Sending Reply failed");
|
||||
@@ -185,8 +185,8 @@ void FunctionTopicTests::onFunctionTopicRequest(const rti::core::SampleIdentity&
|
||||
|
||||
DdsUnitTests::FunctionReply reply;
|
||||
|
||||
reply.id(2);
|
||||
reply.errorString("What?");
|
||||
reply.id = 2;
|
||||
reply.errorString = "What?";
|
||||
|
||||
bool bRet = m_fts->sendReply(sampleId, reply);
|
||||
QVERIFY2(bRet, "Sending Reply failed");
|
||||
@@ -200,21 +200,21 @@ void FunctionTopicTests::slotRequestedData(const DdsUnitTests::FunctionTopicTest
|
||||
Q_UNUSED(seqNo);
|
||||
QCOMPARE(m_mainThreadId, QThread::currentThreadId());
|
||||
|
||||
INFO_LOG(m_logger) << "Got reply from FTS: " << reply.replyState();
|
||||
INFO_LOG(m_logger) << "Got reply from FTS: " << reply.replyState;
|
||||
|
||||
m_replyTopicWithState = reply;
|
||||
|
||||
if (m_replyTopicWithState.replyState() == Core::FtReplyState::InProgress)
|
||||
if (m_replyTopicWithState.replyState == Core::FtReplyState::InProgress)
|
||||
{
|
||||
QVERIFY(!bFinished);
|
||||
QCOMPARE(m_replyTopicWithState.id(), 0);
|
||||
QCOMPARE(m_replyTopicWithState.id, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
QVERIFY(bFinished);
|
||||
QCOMPARE(m_replyTopicWithState.id(), 1);
|
||||
QCOMPARE(m_replyTopicWithState.errorString(), std::string("Hello"));
|
||||
QCOMPARE(m_replyTopicWithState.replyState().underlying(), Core::FtReplyState::Completed);
|
||||
QCOMPARE(m_replyTopicWithState.id, 1);
|
||||
QCOMPARE(m_replyTopicWithState.errorString, std::string("Hello"));
|
||||
QCOMPARE(static_cast<int>(m_replyTopicWithState.replyState), static_cast<int>(Core::FtReplyState::Completed));
|
||||
}
|
||||
emit functionTopicReply();
|
||||
}
|
||||
@@ -226,8 +226,8 @@ void FunctionTopicTests::slotRequestedData(const DdsUnitTests::FunctionTopicTest
|
||||
QCOMPARE(m_mainThreadId, QThread::currentThreadId());
|
||||
|
||||
m_replyTopic = reply;
|
||||
QCOMPARE(m_replyTopic.id(), 2);
|
||||
QCOMPARE(m_replyTopic.errorString(), std::string("What?"));
|
||||
QCOMPARE(m_replyTopic.id, 2);
|
||||
QCOMPARE(m_replyTopic.errorString, std::string("What?"));
|
||||
|
||||
emit functionTopicReply();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user