UnitTests: Fix ODR problem for print functions

You have to include them for all translationunits because otherwise default
print function are generated. So you get to different implementations for
the same symbol.

Change-Id: I732d2e1f1774f72acdbb49cbe1848d31ca3f5c98
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Marco Bubke
2017-11-30 11:27:06 +01:00
parent 74a5083163
commit b1bb6d9641
4 changed files with 7 additions and 17 deletions

View File

@@ -23,10 +23,7 @@
**
****************************************************************************/
#include <gmock/gmock.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>
#include "gtest-qt-printing.h"
#include "googletest.h"
namespace {

View File

@@ -25,12 +25,9 @@
#pragma once
#include <clangcodemodelserverinterface.h>
#include "googletest.h"
#include <gmock/gmock.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>
#include "gtest-qt-printing.h"
#include <clangcodemodelserverinterface.h>
class MockClangCodeModelServer : public ClangBackEnd::ClangCodeModelServerInterface {
public:

View File

@@ -25,12 +25,9 @@
#pragma once
#include <sourcelocationscontainer.h>
#include "googletest.h"
#include <gmock/gmock.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>
#include "gtest-qt-printing.h"
#include <sourcelocationscontainer.h>
class MockRefactoringClientCallBack
{

View File

@@ -23,6 +23,8 @@
**
****************************************************************************/
#include "googletest.h"
#include <sqliteglobal.h>
#include <utils/temporarydirectory.h>
@@ -30,9 +32,6 @@
#include <QCoreApplication>
#include <QLoggingCategory>
#include <gtest/gtest.h>
#include "gtest-qt-printing.h"
#ifdef WITH_BENCHMARKS
#include <benchmark/benchmark.h>
#endif