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    cflags: [
29        "-Wall",
30        "-Werror",
31        "-Wno-sign-compare",
32        "-Wno-unused-parameter",
33        "-Wno-unused-private-field",
34    ],
35    include_dirs: [
36        "external/googletest/googlemock",
37        "external/googletest/googletest",
38    ],
39    static_libs: [
40        "libgmock_main",
41        "libgmock",
42        "libgtest",
43    ],
44}
45
46cc_test {
47    name: "gmock_tests",
48    defaults: ["gmock_test_defaults"],
49    test_per_src: true,
50    srcs: [
51        "gmock-actions_test.cc",
52        "gmock-cardinalities_test.cc",
53
54        // Test is disabled because Android doesn't build gmock with exceptions.
55        //"gmock_ex_test.cc",
56
57        "gmock-internal-utils_test.cc",
58        "gmock-matchers_test.cc",
59        "gmock-more-actions_test.cc",
60        "gmock-nice-strict_test.cc",
61        "gmock-port_test.cc",
62        "gmock-spec-builders_test.cc",
63        "gmock_test.cc",
64    ],
65}
66
67cc_test {
68    name: "gmock_link_test",
69    defaults: ["gmock_test_defaults"],
70    relative_install_path: "gmock_tests",
71    no_named_install_directory: true,
72    srcs: [
73        "gmock_link_test.cc",
74        "gmock_link2_test.cc",
75    ],
76}
77