more tests changes
This commit is contained in:
parent
b888e23fce
commit
96077bc9f3
|
@ -56,6 +56,7 @@ cc_test(
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
include = [
|
include = [
|
||||||
"gtest-*.cc",
|
"gtest-*.cc",
|
||||||
|
"googletest-*.cc",
|
||||||
"*.h",
|
"*.h",
|
||||||
"googletest/include/gtest/**/*.h",
|
"googletest/include/gtest/**/*.h",
|
||||||
],
|
],
|
||||||
|
@ -68,6 +69,17 @@ cc_test(
|
||||||
"gtest-listener_test.cc",
|
"gtest-listener_test.cc",
|
||||||
"gtest-unittest-api_test.cc",
|
"gtest-unittest-api_test.cc",
|
||||||
"gtest-param-test_test.cc",
|
"gtest-param-test_test.cc",
|
||||||
|
"googletest-catch-exceptions-test_.cc",
|
||||||
|
"googletest-color-test_.cc",
|
||||||
|
"googletest-env-var-test_.cc",
|
||||||
|
"googletest-filter-unittest_.cc",
|
||||||
|
"googletest-break-on-failure-unittest_.cc",
|
||||||
|
"googletest-listener-test.cc",
|
||||||
|
"googletest-output-test_.cc",
|
||||||
|
"googletest-list-tests-unittest_.cc",
|
||||||
|
"googletest-shuffle-test_.cc",
|
||||||
|
"googletest-uninitialized-test_.cc",
|
||||||
|
|
||||||
],
|
],
|
||||||
) + select({
|
) + select({
|
||||||
"//:windows": [],
|
"//:windows": [],
|
||||||
|
@ -98,6 +110,14 @@ cc_test(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Tests death tests.
|
||||||
|
cc_test(
|
||||||
|
name = "googletest-death-test-test",
|
||||||
|
size = "medium",
|
||||||
|
srcs = ["googletest-death-test-test.cc"],
|
||||||
|
deps = ["//:gtest_main"],
|
||||||
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
name = "gtest_test_macro_stack_footprint_test",
|
name = "gtest_test_macro_stack_footprint_test",
|
||||||
size = "small",
|
size = "small",
|
||||||
|
@ -399,17 +419,17 @@ py_test(
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_binary(
|
cc_binary(
|
||||||
name = "gtest_uninitialized_test_",
|
name = "googletest-uninitialized-test_",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["gtest_uninitialized_test_.cc"],
|
srcs = ["googletest-uninitialized-test_.cc"],
|
||||||
deps = ["//:gtest"],
|
deps = ["//:gtest"],
|
||||||
)
|
)
|
||||||
|
|
||||||
py_test(
|
py_test(
|
||||||
name = "gtest_uninitialized_test",
|
name = "googletest-uninitialized-test",
|
||||||
size = "medium",
|
size = "medium",
|
||||||
srcs = ["gtest_uninitialized_test.py"],
|
srcs = ["googletest-uninitialized-test.py"],
|
||||||
data = [":gtest_uninitialized_test_"],
|
data = ["googletest-uninitialized-test_"],
|
||||||
deps = [":gtest_test_utils"],
|
deps = [":gtest_test_utils"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ __author__ = 'wan@google.com (Zhanyong Wan)'
|
||||||
|
|
||||||
import gtest_test_utils
|
import gtest_test_utils
|
||||||
|
|
||||||
COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_')
|
COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_')
|
||||||
|
|
||||||
|
|
||||||
def Assert(condition):
|
def Assert(condition):
|
43
googletest/test/googletest-uninitialized-test_.cc
Normal file
43
googletest/test/googletest-uninitialized-test_.cc
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
// Copyright 2008, Google Inc.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from
|
||||||
|
// this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
// Author: wan@google.com (Zhanyong Wan)
|
||||||
|
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
TEST(DummyTest, Dummy) {
|
||||||
|
// This test doesn't verify anything. We just need it to create a
|
||||||
|
// realistic stage for testing the behavior of Google Test when
|
||||||
|
// RUN_ALL_TESTS() is called without
|
||||||
|
// testing::InitGoogleTest() being called first.
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user