mirror of
https://github.com/openharmony/third_party_googletest.git
synced 2026-07-01 03:22:07 -04:00
@@ -7,6 +7,14 @@ config("gtest_private_config") {
|
||||
include_dirs = [ "googletest" ]
|
||||
}
|
||||
|
||||
config("gtest_private_config_rtti") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [ "googletest" ]
|
||||
cflags = [ "-frtti" ]
|
||||
cflags_objcc = [ "-frtti" ]
|
||||
cflags_cc = [ "-frtti" ]
|
||||
}
|
||||
|
||||
config("gtest_config") {
|
||||
include_dirs = [ "googletest/include" ]
|
||||
if (is_mingw) {
|
||||
@@ -17,58 +25,75 @@ config("gtest_config") {
|
||||
}
|
||||
}
|
||||
|
||||
sources_files = [
|
||||
"googletest/include/gtest/gtest-death-test.h",
|
||||
"googletest/include/gtest/gtest-matchers.h",
|
||||
"googletest/include/gtest/gtest-message.h",
|
||||
"googletest/include/gtest/gtest-param-test.h",
|
||||
"googletest/include/gtest/gtest-printers.h",
|
||||
"googletest/include/gtest/gtest-test-part.h",
|
||||
"googletest/include/gtest/gtest-typed-test.h",
|
||||
"googletest/include/gtest/gtest_pred_impl.h",
|
||||
"googletest/include/gtest/gtest_prod.h",
|
||||
"googletest/include/gtest/hwext/gtest-ext.h",
|
||||
"googletest/include/gtest/hwext/gtest-filter.h",
|
||||
"googletest/include/gtest/hwext/gtest-multithread.h",
|
||||
"googletest/include/gtest/hwext/gtest-tag.h",
|
||||
"googletest/include/gtest/hwext/utils.h",
|
||||
"googletest/include/gtest/internal/custom/gtest-port.h",
|
||||
"googletest/include/gtest/internal/custom/gtest-printers.h",
|
||||
"googletest/include/gtest/internal/custom/gtest.h",
|
||||
"googletest/include/gtest/internal/gtest-death-test-internal.h",
|
||||
"googletest/include/gtest/internal/gtest-filepath.h",
|
||||
"googletest/include/gtest/internal/gtest-internal.h",
|
||||
"googletest/include/gtest/internal/gtest-param-util.h",
|
||||
"googletest/include/gtest/internal/gtest-port-arch.h",
|
||||
"googletest/include/gtest/internal/gtest-port.h",
|
||||
"googletest/include/gtest/internal/gtest-string.h",
|
||||
"googletest/include/gtest/internal/gtest-type-util.h",
|
||||
"googletest/src/gtest-all.cc",
|
||||
"googletest/src/gtest-death-test.cc",
|
||||
"googletest/src/gtest-filepath.cc",
|
||||
"googletest/src/gtest-internal-inl.h",
|
||||
"googletest/src/gtest-matchers.cc",
|
||||
"googletest/src/gtest-port.cc",
|
||||
"googletest/src/gtest-printers.cc",
|
||||
"googletest/src/gtest-test-part.cc",
|
||||
"googletest/src/gtest-typed-test.cc",
|
||||
"googletest/src/gtest.cc",
|
||||
"googletest/src/hwext/gtest-ext.cc",
|
||||
"googletest/src/hwext/gtest-filter.cc",
|
||||
"googletest/src/hwext/gtest-multithread.cpp",
|
||||
"googletest/src/hwext/gtest-tag.cc",
|
||||
"googletest/src/hwext/gtest-utils.cc",
|
||||
]
|
||||
|
||||
static_library("gtest") {
|
||||
testonly = true
|
||||
public = [
|
||||
"googletest/include/gtest/gtest-spi.h",
|
||||
"googletest/include/gtest/gtest.h",
|
||||
]
|
||||
sources = [
|
||||
"googletest/include/gtest/gtest-death-test.h",
|
||||
"googletest/include/gtest/gtest-message.h",
|
||||
"googletest/include/gtest/gtest-param-test.h",
|
||||
"googletest/include/gtest/gtest-printers.h",
|
||||
"googletest/include/gtest/gtest-test-part.h",
|
||||
"googletest/include/gtest/gtest-typed-test.h",
|
||||
"googletest/include/gtest/gtest_pred_impl.h",
|
||||
"googletest/include/gtest/gtest_prod.h",
|
||||
"googletest/include/gtest/gtest-matchers.h",
|
||||
"googletest/include/gtest/hwext/gtest-ext.h",
|
||||
"googletest/include/gtest/hwext/gtest-filter.h",
|
||||
"googletest/include/gtest/hwext/gtest-multithread.h",
|
||||
"googletest/include/gtest/hwext/gtest-tag.h",
|
||||
"googletest/include/gtest/hwext/utils.h",
|
||||
"googletest/include/gtest/internal/custom/gtest-port.h",
|
||||
"googletest/include/gtest/internal/custom/gtest-printers.h",
|
||||
"googletest/include/gtest/internal/custom/gtest.h",
|
||||
"googletest/include/gtest/internal/gtest-death-test-internal.h",
|
||||
"googletest/include/gtest/internal/gtest-filepath.h",
|
||||
"googletest/include/gtest/internal/gtest-internal.h",
|
||||
"googletest/include/gtest/internal/gtest-param-util.h",
|
||||
"googletest/include/gtest/internal/gtest-port-arch.h",
|
||||
"googletest/include/gtest/internal/gtest-port.h",
|
||||
"googletest/include/gtest/internal/gtest-string.h",
|
||||
"googletest/src/gtest-all.cc",
|
||||
"googletest/src/gtest-death-test.cc",
|
||||
"googletest/src/gtest-filepath.cc",
|
||||
"googletest/src/gtest-internal-inl.h",
|
||||
"googletest/src/gtest-port.cc",
|
||||
"googletest/src/gtest-printers.cc",
|
||||
"googletest/src/gtest-test-part.cc",
|
||||
"googletest/src/gtest-typed-test.cc",
|
||||
"googletest/src/gtest.cc",
|
||||
"googletest/src/hwext/gtest-ext.cc",
|
||||
"googletest/src/hwext/gtest-filter.cc",
|
||||
"googletest/src/hwext/gtest-multithread.cpp",
|
||||
"googletest/src/hwext/gtest-tag.cc",
|
||||
"googletest/src/hwext/gtest-utils.cc",
|
||||
]
|
||||
sources = sources_files
|
||||
sources -= [ "googletest/src/gtest-all.cc" ]
|
||||
public_configs = [ ":gtest_config" ]
|
||||
configs += [ ":gtest_private_config" ]
|
||||
configs -= [ "//build/config/coverage:default_coverage" ]
|
||||
}
|
||||
|
||||
static_library("gtest_rtti") {
|
||||
testonly = true
|
||||
public = [
|
||||
"googletest/include/gtest/gtest-spi.h",
|
||||
"googletest/include/gtest/gtest.h",
|
||||
]
|
||||
sources = sources_files
|
||||
sources -= [ "googletest/src/gtest-all.cc" ]
|
||||
public_configs = [ ":gtest_config" ]
|
||||
configs += [ ":gtest_private_config_rtti" ]
|
||||
configs -= [ "//build/config/coverage:default_coverage" ]
|
||||
}
|
||||
|
||||
static_library("gtest_main") {
|
||||
testonly = true
|
||||
sources = [ "googletest/src/gtest_main.cc" ]
|
||||
@@ -109,9 +134,9 @@ static_library("gmock") {
|
||||
"googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
|
||||
"googlemock/include/gmock/internal/custom/gmock-matchers.h",
|
||||
"googlemock/include/gmock/internal/custom/gmock-port.h",
|
||||
"googlemock/include/gmock/internal/gmock-pp.h",
|
||||
"googlemock/include/gmock/internal/gmock-internal-utils.h",
|
||||
"googlemock/include/gmock/internal/gmock-port.h",
|
||||
"googlemock/include/gmock/internal/gmock-pp.h",
|
||||
"googlemock/src/gmock-all.cc",
|
||||
"googlemock/src/gmock-cardinalities.cc",
|
||||
"googlemock/src/gmock-internal-utils.cc",
|
||||
|
||||
@@ -64,12 +64,9 @@ Note:If the text contains special characters, please escape them according to th
|
||||
<filteritem type="filepath" name="googletest/googlemock/configure.ac " desc="Non-licensing declaration file."/>
|
||||
<filteritem type="filepath" name="googletest/googlemock/Makefile.am " desc="Non-licensing declaration file."/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
<filteritem type="filename" name=".*" desc="not used in ohos"/>
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binaryFile" >
|
||||
<filteritem type="filename" name=".*" desc="not used in ohos"/>
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
<filteritem type="filepath" name="googletest/src/hwext/gtest-filter.cc " desc="Non-licensing declaration file."/>
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
||||
+4
-4
@@ -3,9 +3,9 @@
|
||||
"Name": "googletest",
|
||||
"License": "BSD 3-Clause License",
|
||||
"License File": "LICENSE",
|
||||
"Version Number": "1.8.1",
|
||||
"Version Number": "1.11.0",
|
||||
"Owner": "zhangchunbao@huawei.com",
|
||||
"Upstream URL": "https://github.com/google/googletest/releases/tag/release-1.8.1",
|
||||
"Description": "The 1.8.x is the last release supporting pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven critical"
|
||||
"Upstream URL": "https://github.com/google/googletest/releases/tag/release-1.11.0",
|
||||
"Description": "The 1.11.x is the last release supporting pre-C++11 compilers. The 1.11.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven critical"
|
||||
}
|
||||
]
|
||||
]
|
||||
+18
-5
@@ -10,11 +10,14 @@
|
||||
"dirs": {},
|
||||
"scripts": {},
|
||||
"component": {
|
||||
"name": "thirdparty_googletest",
|
||||
"subsystem": "",
|
||||
"name": "googletest",
|
||||
"subsystem": "thirdparty",
|
||||
"syscap": [],
|
||||
"features": [],
|
||||
"adapted_system_type": [],
|
||||
"adapted_system_type": [
|
||||
"small",
|
||||
"standard"
|
||||
],
|
||||
"rom": "",
|
||||
"ram": "",
|
||||
"deps": {
|
||||
@@ -23,8 +26,18 @@
|
||||
},
|
||||
"build": {
|
||||
"sub_component": [],
|
||||
"inner_kits": [],
|
||||
"inner_kits": [
|
||||
{
|
||||
"name": "//third_party/googletest:gtest",
|
||||
"header": {
|
||||
"header_files": [
|
||||
"gtest.h"
|
||||
],
|
||||
"header_base": "//third_party/googletest/googletest/include/gtest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"test": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,6 +364,8 @@ using internal::FunctionMocker;
|
||||
#define MOCK_METHOD9(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 9, __VA_ARGS__)
|
||||
#define MOCK_METHOD10(m, ...) \
|
||||
GMOCK_INTERNAL_MOCK_METHODN(, , m, 10, __VA_ARGS__)
|
||||
#define MOCK_METHOD11(m, ...) \
|
||||
GMOCK_INTERNAL_MOCK_METHODN(, , m, 11, __VA_ARGS__)
|
||||
|
||||
#define MOCK_CONST_METHOD0(m, ...) \
|
||||
GMOCK_INTERNAL_MOCK_METHODN(const, , m, 0, __VA_ARGS__)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define GTEST_INCLUDE_GTEST_GTEST_TAG_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -2303,7 +2303,7 @@ static const char* const kReservedTestCaseAttributes[] = {
|
||||
// still RecordProperty("result") or "RecordProperty(timestamp")
|
||||
static const char* const kReservedOutputTestCaseAttributes[] = {
|
||||
"classname", "name", "status", "time", "type_param",
|
||||
"value_param", "file", "line", "result", "timestamp"};
|
||||
"value_param", "file", "line", "result", "timestamp", "level"};
|
||||
|
||||
template <size_t kSize>
|
||||
std::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {
|
||||
|
||||
Reference in New Issue
Block a user