• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "external_googletest_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-BSD
21    default_applicable_licenses: ["external_googletest_license"],
22}
23
24cc_defaults {
25    name: "gmock_test_defaults",
26    host_supported: true,
27    gtest: false,
28    cpp_std: "c++14",
29    cflags: [
30        "-Wall",
31        "-Werror",
32        "-Wno-sign-compare",
33        "-Wno-unused-parameter",
34        "-Wno-unused-private-field",
35    ],
36    include_dirs: [
37        "external/googletest/googlemock",
38        "external/googletest/googletest",
39    ],
40    static_libs: [
41        "libgmock_main",
42        "libgmock",
43        "libgtest",
44    ],
45}
46
47cc_test {
48    name: "gmock_tests",
49    defaults: ["gmock_test_defaults"],
50    test_per_src: true,
51    srcs: [
52        "gmock-actions_test.cc",
53        "gmock-cardinalities_test.cc",
54
55        // Test is disabled because Android doesn't build gmock with exceptions.
56        //"gmock_ex_test.cc",
57
58        "gmock-function-mocker_test.cc",
59        "gmock-internal-utils_test.cc",
60        "gmock-matchers-arithmetic_test.cc",
61        "gmock-matchers-comparisons_test.cc",
62        "gmock-matchers-containers_test.cc",
63        "gmock-matchers-misc_test.cc",
64        "gmock-more-actions_test.cc",
65        "gmock-nice-strict_test.cc",
66        "gmock-port_test.cc",
67        "gmock-pp_test.cc",
68        "gmock-pp-string_test.cc",
69        "gmock-spec-builders_test.cc",
70        "gmock_test.cc",
71    ],
72}
73
74cc_test {
75    name: "gmock_link_test",
76    defaults: ["gmock_test_defaults"],
77    relative_install_path: "gmock_tests",
78    no_named_install_directory: true,
79    srcs: [
80        "gmock_link_test.cc",
81        "gmock_link2_test.cc",
82    ],
83}
84