Umbrella project for an GenericWidgets client using the GenericCore library (Using submodules). With a GoogleTest project testing GenericCore::toString() method.
This commit is contained in:
20
tests/GenericCoreTests/core_test.cpp
Normal file
20
tests/GenericCoreTests/core_test.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "../../libs/GenericCore/genericcore.h"
|
||||
|
||||
TEST(CoreTests, TestEqualString) {
|
||||
const auto expected = "GenericCore (Version x.y.z)";
|
||||
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 auto expected = "Hello from the Core!";
|
||||
auto core = std::make_unique<GenericCore>();
|
||||
const auto actual = core->toString();
|
||||
ASSERT_NE(expected, actual);
|
||||
}
|
||||
Reference in New Issue
Block a user