forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a re-land of http://crrev.com/2779193002 which was reverted due to build errors on Mac. GoogleTest (gtest) and GoogleMock (gmock) are now hosted into the same googletest repository. In order to cope with this, the googletest repository is now sourced at third_party/googletest. The file/directory layout of Google Test is not yet considered stable. To minimize disruption while Google Test stabilizes, Chromium code will be insulated from third_party/googletest. * testing/gtest/include/gtest/ and testing/gmock/include/gmock have been populated with headers that forward into the appropriate locations of third_party/googletest * testing/BUILD.gn has been populated with the targets //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main), which depend on the appropriate //third_party/googletest targets. All Chromium code should keep depending on the targets and headers in testing/{gtest,gmock} for now. BUG=630705 TESTED=ninja -C out/Default/ ced_unittests && ninja -C out/Default TBR=rkc,dpranke,agl Review-Url: https://codereview.chromium.org/2852613002 Cr-Commit-Position: refs/heads/master@{#468860}
- Loading branch information
Showing
30 changed files
with
428 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# The file/directory layout of Google Test is not yet considered stable. Until | ||
# it stabilizes, Chromium code MUST use this target instead of reaching directly | ||
# into //third_party/googletest. | ||
source_set("gmock") { | ||
testonly = true | ||
sources = [ | ||
"include/gmock/gmock-actions.h", | ||
"include/gmock/gmock-generated-function-mockers.h", | ||
"include/gmock/gmock-matchers.h", | ||
"include/gmock/gmock.h", | ||
] | ||
deps = [ | ||
"//third_party/googletest:gmock", | ||
] | ||
|
||
public_configs = [ | ||
"//third_party/googletest:gmock_config", | ||
"//third_party/googletest:gtest_config", | ||
] | ||
} | ||
|
||
# The file/directory layout of Google Test is not yet considered stable. Until | ||
# it stabilizes, Chromium code MUST use this target instead of reaching directly | ||
# into //third_party/googletest. | ||
source_set("gmock_main") { | ||
testonly = true | ||
deps = [ | ||
"//third_party/googletest:gmock_main", | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thakis@chromium.org | ||
pwnall@chromium.org |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googlemock/include/gmock/gmock-actions.h" |
10 changes: 10 additions & 0 deletions
10
testing/gmock/include/gmock/gmock-generated-function-mockers.h
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googlemock/include/gmock/gmock-generated-function-mockers.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googlemock/include/gmock/gmock.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build_overrides/gtest.gni") | ||
|
||
config("gtest_direct_config") { | ||
visibility = [ ":*" ] | ||
defines = [ "UNIT_TEST" ] | ||
} | ||
|
||
# The file/directory layout of Google Test is not yet considered stable. Until | ||
# it stabilizes, Chromium code MUST use this target instead of reaching directly | ||
# into //third_party/googletest. | ||
static_library("gtest") { | ||
testonly = true | ||
|
||
sources = [ | ||
"include/gtest/gtest-death-test.h", | ||
"include/gtest/gtest-message.h", | ||
"include/gtest/gtest-param-test.h", | ||
"include/gtest/gtest-spi.h", | ||
"include/gtest/gtest.h", | ||
"include/gtest/gtest_prod.h", | ||
|
||
# This is a workaround for the issues below. | ||
# | ||
# 1) This target needs to be a static_library (not a source set) on Mac to | ||
# avoid the build errors in | ||
# https://codereview.chromium.org/2779193002#msg82. | ||
# 2) A static_library must have at least one source file, to avoid build | ||
# errors on Mac and Windows. https://crbug.com/710334 | ||
# 3) A static_library with complete_static_lib = true, which would not | ||
# require adding the empty file, will result in duplicate symbols on | ||
# Android. https://codereview.chromium.org/2852613002/#ps20001 | ||
"empty.cc", | ||
] | ||
deps = [ | ||
"//third_party/googletest:gtest", | ||
] | ||
|
||
public_configs = [ ":gtest_direct_config" ] | ||
|
||
if (gtest_include_multiprocess) { | ||
sources += [ | ||
"../multiprocess_func_list.cc", | ||
"../multiprocess_func_list.h", | ||
] | ||
} | ||
|
||
if (gtest_include_platform_test) { | ||
sources += [ "../platform_test.h" ] | ||
} | ||
|
||
if ((is_mac || is_ios) && gtest_include_objc_support) { | ||
if (is_ios) { | ||
set_sources_assignment_filter([]) | ||
} | ||
sources += [ | ||
"../gtest_mac.h", | ||
"../gtest_mac.mm", | ||
] | ||
if (gtest_include_platform_test) { | ||
sources += [ "../platform_test_mac.mm" ] | ||
} | ||
set_sources_assignment_filter(sources_assignment_filter) | ||
} | ||
|
||
if (is_ios && gtest_include_ios_coverage) { | ||
sources += [ | ||
"../coverage_util_ios.cc", | ||
"../coverage_util_ios.h", | ||
] | ||
} | ||
} | ||
|
||
# The file/directory layout of Google Test is not yet considered stable. Until | ||
# it stabilizes, Chromium code MUST use this target instead of reaching directly | ||
# into //third_party/googletest. | ||
source_set("gtest_main") { | ||
testonly = true | ||
deps = [ | ||
"//third_party/googletest:gtest_main", | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thakis@chromium.org | ||
pwnall@chromium.org |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest-death-test.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest-message.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest-param-test.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest-spi.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest.h" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// The file/directory layout of Google Test is not yet considered stable. Until | ||
// it stabilizes, Chromium code will use forwarding headers in testing/gtest | ||
// and testing/gmock, instead of directly including files in | ||
// third_party/googletest. | ||
|
||
#include "third_party/googletest/src/googletest/include/gtest/gtest_prod.h" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.