|
|
@ -86,7 +86,7 @@ cc_library( |
|
|
|
deps = [":gmock"], |
|
|
|
deps = [":gmock"], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
"""gtest own tests """ |
|
|
|
""" gtest own tests """ |
|
|
|
|
|
|
|
|
|
|
|
#on windows exclude gtest-tuple.h and gtest-tuple_test.cc |
|
|
|
#on windows exclude gtest-tuple.h and gtest-tuple_test.cc |
|
|
|
filegroup( |
|
|
|
filegroup( |
|
|
@ -157,8 +157,7 @@ cc_test( |
|
|
|
deps = [":gtest_main"], |
|
|
|
deps = [":gtest_main"], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
""" these googletest tests have their own main()""" |
|
|
|
#These googletest tests have their own main() |
|
|
|
|
|
|
|
|
|
|
|
cc_test( |
|
|
|
cc_test( |
|
|
|
name = "gtest-death-test", |
|
|
|
name = "gtest-death-test", |
|
|
|
size = "small", |
|
|
|
size = "small", |
|
|
@ -208,8 +207,7 @@ cc_test( |
|
|
|
], |
|
|
|
], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
""" googletest samples""" |
|
|
|
# The following rules build samples of how to use gTest. |
|
|
|
|
|
|
|
|
|
|
|
cc_library( |
|
|
|
cc_library( |
|
|
|
name = "gtest_sample_lib", |
|
|
|
name = "gtest_sample_lib", |
|
|
|
srcs = [ |
|
|
|
srcs = [ |
|
|
@ -224,41 +222,35 @@ cc_library( |
|
|
|
"googletest/samples/sample3-inl.h", |
|
|
|
"googletest/samples/sample3-inl.h", |
|
|
|
"googletest/samples/sample4.h", |
|
|
|
"googletest/samples/sample4.h", |
|
|
|
], |
|
|
|
], |
|
|
|
deps = ["gtest"], |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
cc_test( |
|
|
|
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/sample*.cc", |
|
|
|
"googletest/samples/sample1_unitest.cc", |
|
|
|
"googletest/samples/sample*.h", |
|
|
|
"googletest/samples/sample2_unitest.cc", |
|
|
|
], |
|
|
|
"googletest/samples/sample3_unitest.cc", |
|
|
|
exclude = [ |
|
|
|
"googletest/samples/sample4_unitest.cc", |
|
|
|
"googletest/samples/sample1.cc", |
|
|
|
"googletest/samples/sample5_unitest.cc", |
|
|
|
"googletest/samples/sample2.cc", |
|
|
|
"googletest/samples/sample6_unitest.cc", |
|
|
|
"googletest/samples/sample4.cc", |
|
|
|
"googletest/samples/sample7_unitest.cc", |
|
|
|
"googletest/samples/prime_tables.h", |
|
|
|
"googletest/samples/sample8_unitest.cc", |
|
|
|
"googletest/samples/sample1.h", |
|
|
|
|
|
|
|
"googletest/samples/sample2.h", |
|
|
|
|
|
|
|
"googletest/samples/sample3-inl.h", |
|
|
|
|
|
|
|
"googletest/samples/sample4.h", |
|
|
|
|
|
|
|
"googletest/samples/sample9_unittest.cc", |
|
|
|
|
|
|
|
"googletest/samples/sample10_unittest.cc", |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
includes = [ |
|
|
|
includes = [ |
|
|
|
"googletest/samples", |
|
|
|
"googletest/samples", |
|
|
|
], |
|
|
|
], |
|
|
|
deps = [ |
|
|
|
deps = [ |
|
|
|
":gtest_sample_lib", |
|
|
|
|
|
|
|
":gtest_main", |
|
|
|
":gtest_main", |
|
|
|
|
|
|
|
":gtest_sample_lib", |
|
|
|
], |
|
|
|
], |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
""" googletest samples 9 and 10 have their own main()""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cc_test( |
|
|
|
cc_test( |
|
|
|
name = "gtest_sample9", |
|
|
|
name = "gtest_sample9", |
|
|
|
size = "small", |
|
|
|
size = "small", |
|
|
|