mirror of https://github.com/qt/qtgrpc.git
Test code is should be updated according the latest generator version
Add protobufgen output files to the grpcgen test for auto checking them up to date Pick-to: 6.5 Change-Id: Ia7c3fcedfc9b3a4f0e66e748db8d5d818b4fb069 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
b0fbb0beb5
commit
fa202dd944
|
|
@ -51,9 +51,9 @@ void SimpleStringMessage::registerTypes()
|
|||
SimpleStringMessage::SimpleStringMessage() : QProtobufMessage(&SimpleStringMessage::staticMetaObject)
|
||||
{
|
||||
}
|
||||
SimpleStringMessage::SimpleStringMessage(const SimpleStringMessage &other) : QProtobufMessage(other)
|
||||
SimpleStringMessage::SimpleStringMessage(const SimpleStringMessage &other) : QProtobufMessage(other),
|
||||
m_testFieldString(other.m_testFieldString)
|
||||
{
|
||||
setTestFieldString(other.m_testFieldString);
|
||||
}
|
||||
SimpleStringMessage &SimpleStringMessage::operator =(const SimpleStringMessage &other)
|
||||
{
|
||||
|
|
@ -136,9 +136,9 @@ SimpleIntMessage::SimpleIntMessage() : QProtobufMessage(&SimpleIntMessage::stati
|
|||
m_testField(0)
|
||||
{
|
||||
}
|
||||
SimpleIntMessage::SimpleIntMessage(const SimpleIntMessage &other) : QProtobufMessage(other)
|
||||
SimpleIntMessage::SimpleIntMessage(const SimpleIntMessage &other) : QProtobufMessage(other),
|
||||
m_testField(other.m_testField)
|
||||
{
|
||||
setTestField(other.m_testField);
|
||||
}
|
||||
SimpleIntMessage &SimpleIntMessage::operator =(const SimpleIntMessage &other)
|
||||
{
|
||||
|
|
@ -213,9 +213,9 @@ void BlobMessage::registerTypes()
|
|||
BlobMessage::BlobMessage() : QProtobufMessage(&BlobMessage::staticMetaObject)
|
||||
{
|
||||
}
|
||||
BlobMessage::BlobMessage(const BlobMessage &other) : QProtobufMessage(other)
|
||||
BlobMessage::BlobMessage(const BlobMessage &other) : QProtobufMessage(other),
|
||||
m_testBytes(other.m_testBytes)
|
||||
{
|
||||
setTestBytes(other.m_testBytes);
|
||||
}
|
||||
BlobMessage &BlobMessage::operator =(const BlobMessage &other)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
Q_ENUM(QtProtobufFieldEnum)
|
||||
|
||||
SimpleStringMessage();
|
||||
~SimpleStringMessage() override;
|
||||
~SimpleStringMessage();
|
||||
SimpleStringMessage(const SimpleStringMessage &other);
|
||||
SimpleStringMessage &operator =(const SimpleStringMessage &other);
|
||||
SimpleStringMessage(SimpleStringMessage &&other) noexcept;
|
||||
|
|
@ -72,7 +72,7 @@ public:
|
|||
Q_ENUM(QtProtobufFieldEnum)
|
||||
|
||||
SimpleIntMessage();
|
||||
~SimpleIntMessage() override;
|
||||
~SimpleIntMessage();
|
||||
SimpleIntMessage(const SimpleIntMessage &other);
|
||||
SimpleIntMessage &operator =(const SimpleIntMessage &other);
|
||||
SimpleIntMessage(SimpleIntMessage &&other) noexcept;
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
Q_ENUM(QtProtobufFieldEnum)
|
||||
|
||||
BlobMessage();
|
||||
~BlobMessage() override;
|
||||
~BlobMessage();
|
||||
BlobMessage(const BlobMessage &other);
|
||||
BlobMessage &operator =(const BlobMessage &other);
|
||||
BlobMessage(BlobMessage &&other) noexcept;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define DEFSTR(x) #x
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
const QLatin1StringView cppProtobufGenExtension(".qpb.cpp");
|
||||
const QLatin1StringView headerProtobufGenExtension(".qpb.h");
|
||||
const QLatin1StringView cppExtension("_client.grpc.qpb.cpp");
|
||||
const QLatin1StringView headerExtension("_client.grpc.qpb.h");
|
||||
const QLatin1StringView grpcGenQtprotobufKey(" --plugin=protoc-gen-qtgrpc=");
|
||||
|
|
@ -185,7 +187,10 @@ void tst_qtgrpcgen::cmakeGeneratedFile_data()
|
|||
QTest::addColumn<QString>("folder");
|
||||
QTest::addColumn<QString>("extension");
|
||||
|
||||
const QLatin1StringView extensions[] = { cppExtension, headerExtension };
|
||||
const QLatin1StringView extensions[] = { cppProtobufGenExtension,
|
||||
headerProtobufGenExtension,
|
||||
cppExtension,
|
||||
headerExtension };
|
||||
|
||||
for (const auto extension : extensions) {
|
||||
QTest::addRow("testservice%s", extension.data())
|
||||
|
|
|
|||
Loading…
Reference in New Issue