Initial commit based on GenericQtClient v0.3.0
This commit is contained in:
26
tests/GenericCoreTests/core_test.cpp
Normal file
26
tests/GenericCoreTests/core_test.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "../../libs/GenericCore/genericcore.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
inline void PrintTo(const QString& qString, ::std::ostream* os) { *os << qUtf8Printable(qString); }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
TEST(CoreTests, TestEqualString) {
|
||||
const QString coreName("GenericCore");
|
||||
const QString coreVersion("0.2.0");
|
||||
const auto expected = QString("%1 (Version %2)").arg(coreName).arg(coreVersion);
|
||||
auto core = std::make_unique<GenericCore>();
|
||||
const auto actual = core->toString();
|
||||
// const auto actual = multiply(1, 1);
|
||||
ASSERT_EQ(expected, actual);
|
||||
}
|
||||
|
||||
TEST(CoreTests, TestNotEqualString) {
|
||||
const QString expected = QString("Hello from the Core!");
|
||||
auto core = std::make_unique<GenericCore>();
|
||||
const QString actual = core->toString();
|
||||
ASSERT_NE(expected, actual);
|
||||
}
|
||||
Reference in New Issue
Block a user