forked from qt-creator/qt-creator
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:
@@ -23,10 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "googletest.h"
|
||||||
#include <gmock/gmock-matchers.h>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include "gtest-qt-printing.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@@ -25,12 +25,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <clangcodemodelserverinterface.h>
|
#include "googletest.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include <clangcodemodelserverinterface.h>
|
||||||
#include <gmock/gmock-matchers.h>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include "gtest-qt-printing.h"
|
|
||||||
|
|
||||||
class MockClangCodeModelServer : public ClangBackEnd::ClangCodeModelServerInterface {
|
class MockClangCodeModelServer : public ClangBackEnd::ClangCodeModelServerInterface {
|
||||||
public:
|
public:
|
||||||
|
@@ -25,12 +25,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sourcelocationscontainer.h>
|
#include "googletest.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include <sourcelocationscontainer.h>
|
||||||
#include <gmock/gmock-matchers.h>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include "gtest-qt-printing.h"
|
|
||||||
|
|
||||||
class MockRefactoringClientCallBack
|
class MockRefactoringClientCallBack
|
||||||
{
|
{
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "googletest.h"
|
||||||
|
|
||||||
#include <sqliteglobal.h>
|
#include <sqliteglobal.h>
|
||||||
|
|
||||||
#include <utils/temporarydirectory.h>
|
#include <utils/temporarydirectory.h>
|
||||||
@@ -30,9 +32,6 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include "gtest-qt-printing.h"
|
|
||||||
|
|
||||||
#ifdef WITH_BENCHMARKS
|
#ifdef WITH_BENCHMARKS
|
||||||
#include <benchmark/benchmark.h>
|
#include <benchmark/benchmark.h>
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user