This commit is contained in:
misterg 2017-08-02 15:40:14 -04:00
parent 6615f7df11
commit aa31cb67c2

View File

@ -207,6 +207,7 @@ cc_test(
], ],
) )
# The following rules build samples of how to use gTest. # The following rules build samples of how to use gTest.
cc_library( cc_library(
name = "gtest_sample_lib", name = "gtest_sample_lib",
@ -228,57 +229,40 @@ cc_test(
name = "gtest_samples", name = "gtest_samples",
size = "small", size = "small",
srcs = glob( srcs = glob(
# All Samples here except
# Sample9 is designed to fail on purpose
# Sample10 can be run with --check_for_leaks command line flag, should be separate
include = [ include = [
"googletest/samples/sample1_unitest.cc", #All Samples here except:
"googletest/samples/sample2_unitest.cc", #sample9 designed to fail
"googletest/samples/sample3_unitest.cc", #sample10 takes a command line option and needs to be separate
"googletest/samples/sample4_unitest.cc", "googletest/samples/sample1_unittest.cc",
"googletest/samples/sample5_unitest.cc", "googletest/samples/sample2_unittest.cc",
"googletest/samples/sample6_unitest.cc", "googletest/samples/sample3_unittest.cc",
"googletest/samples/sample7_unitest.cc", "googletest/samples/sample4_unittest.cc",
"googletest/samples/sample8_unitest.cc", "googletest/samples/sample5_unittest.cc",
"googletest/samples/sample6_unittest.cc",
"googletest/samples/sample7_unittest.cc",
"googletest/samples/sample8_unittest.cc",
], ],
), ),
includes = [
"googletest/samples",
],
deps = [
":gtest_main",
":gtest_sample_lib",
],
)
cc_test(
name = "gtest_sample9",
size = "small",
srcs = glob(
include = [
"googletest/samples/sample9_unittest.cc",
],
),
includes = [
"googletest/samples",
],
deps = [ deps = [
"gtest_sample_lib",
":gtest_main", ":gtest_main",
], ],
) )
cc_test( cc_test(
name = "gtest_sample10", name = "sample9_unittest",
size = "small", size = "small",
srcs = glob( srcs = ["googletest/samples/sample9_unittest.cc"],
include = [ deps = [":gtest_main"],
"googletest/samples/sample10_unittest.cc", )
],
), cc_test(
includes = [ name = "sample10_unittest",
"googletest/samples", size = "small",
], srcs = ["googletest/samples/sample10_unittest.cc"],
deps = [ deps = [
":gtest_main", ":gtest_main",
], ],
) )