Created
June 22, 2019 09:09
-
-
Save gusenov/967d3740632bcdbc5fc0b93270e25ac1 to your computer and use it in GitHub Desktop.
Шаблон кода, который создает Qt Creator для Auto Test проектов использующих Google Test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* main.cpp */ | |
#include "tst_mytestcasename.h" | |
#include <gtest/gtest.h> | |
int main(int argc, char *argv[]) | |
{ | |
::testing::InitGoogleTest(&argc, argv); | |
return RUN_ALL_TESTS(); | |
} | |
/* tst_mytestcasename.h */ | |
#ifndef TST_MYTESTCASENAME_H | |
#define TST_MYTESTCASENAME_H | |
#include <gtest/gtest.h> | |
#include <gmock/gmock-matchers.h> | |
using namespace testing; | |
TEST(MyTestCaseName, MyTestSetName) | |
{ | |
EXPECT_EQ(1, 1); | |
ASSERT_THAT(0, Eq(0)); | |
} | |
#endif // TST_MYTESTCASENAME_H | |
// .pro | |
/* | |
include(gtest_dependency.pri) | |
TEMPLATE = app | |
CONFIG += console | |
CONFIG -= app_bundle | |
CONFIG += thread | |
CONFIG -= qt | |
HEADERS += \ | |
tst_mytestcasename.h | |
SOURCES += \ | |
main.cpp | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment