Commit 9d77e63e authored by Tanzinul Islam's avatar Tanzinul Islam
Browse files

Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116

parents 1cd979a8 e82d3205
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// //
// Tests for death tests. // Tests for death tests.
...@@ -1280,7 +1279,7 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) { ...@@ -1280,7 +1279,7 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) {
# if GTEST_OS_WINDOWS # if GTEST_OS_WINDOWS
TEST(EnvironmentTest, HandleFitsIntoSizeT) { TEST(EnvironmentTest, HandleFitsIntoSizeT) {
// TODO(vladl@google.com): Remove this test after this condition is verified // FIXME: Remove this test after this condition is verified
// in a static assertion in gtest-death-test.cc in the function // in a static assertion in gtest-death-test.cc in the function
// GetStatusFileDescriptor. // GetStatusFileDescriptor.
ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t)); ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t));
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
// //
// Tests that verify interaction of exceptions and death tests. // Tests that verify interaction of exceptions and death tests.
...@@ -69,7 +68,7 @@ TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) { ...@@ -69,7 +68,7 @@ TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
"exceptional message"); "exceptional message");
// Verifies that the location is mentioned in the failure text. // Verifies that the location is mentioned in the failure text.
EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""), EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
"gtest-death-test_ex_test.cc"); "googletest-death-test_ex_test.cc");
} }
# endif // GTEST_HAS_EXCEPTIONS # endif // GTEST_HAS_EXCEPTIONS
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
"""Verifies that Google Test correctly parses environment variables.""" """Verifies that Google Test correctly parses environment variables."""
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import gtest_test_utils import gtest_test_utils
...@@ -40,7 +38,7 @@ import gtest_test_utils ...@@ -40,7 +38,7 @@ import gtest_test_utils
IS_WINDOWS = os.name == 'nt' IS_WINDOWS = os.name == 'nt'
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_') COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-env-var-test_')
environ = os.environ.copy() environ = os.environ.copy()
...@@ -62,7 +60,7 @@ def SetEnvVar(env_var, value): ...@@ -62,7 +60,7 @@ def SetEnvVar(env_var, value):
def GetFlag(flag): def GetFlag(flag):
"""Runs gtest_env_var_test_ and returns its output.""" """Runs googletest-env-var-test_ and returns its output."""
args = [COMMAND] args = [COMMAND]
if flag is not None: if flag is not None:
......
...@@ -26,16 +26,14 @@ ...@@ -26,16 +26,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// A helper program for testing that Google Test parses the environment // A helper program for testing that Google Test parses the environment
// variables correctly. // variables correctly.
#include "gtest/gtest.h"
#include <iostream> #include <iostream>
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h" #include "src/gtest-internal-inl.h"
using ::std::cout; using ::std::cout;
...@@ -115,7 +113,7 @@ int main(int argc, char** argv) { ...@@ -115,7 +113,7 @@ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
if (argc != 2) { if (argc != 2) {
cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n"; cout << "Usage: googletest-env-var-test_ NAME_OF_FLAG\n";
return 1; return 1;
} }
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
//
// Google Test filepath utilities // Google Test filepath utilities
// //
// This file tests classes and functions used internally by // This file tests classes and functions used internally by
...@@ -51,7 +50,7 @@ namespace internal { ...@@ -51,7 +50,7 @@ namespace internal {
namespace { namespace {
#if GTEST_OS_WINDOWS_MOBILE #if GTEST_OS_WINDOWS_MOBILE
// TODO(wan@google.com): Move these to the POSIX adapter section in // FIXME: Move these to the POSIX adapter section in
// gtest-port.h. // gtest-port.h.
// Windows CE doesn't have the remove C function. // Windows CE doesn't have the remove C function.
......
...@@ -33,15 +33,13 @@ ...@@ -33,15 +33,13 @@
A user can specify which test(s) in a Google Test program to run via either A user can specify which test(s) in a Google Test program to run via either
the GTEST_FILTER environment variable or the --gtest_filter flag. the GTEST_FILTER environment variable or the --gtest_filter flag.
This script tests such functionality by invoking This script tests such functionality by invoking
gtest_filter_unittest_ (a program written with Google Test) with different googletest-filter-unittest_ (a program written with Google Test) with different
environments and command line flags. environments and command line flags.
Note that test sharding may also influence which tests are filtered. Therefore, Note that test sharding may also influence which tests are filtered. Therefore,
we test that here also. we test that here also.
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import re import re
import sets import sets
...@@ -100,8 +98,8 @@ FILTER_FLAG = 'gtest_filter' ...@@ -100,8 +98,8 @@ FILTER_FLAG = 'gtest_filter'
# The command line flag for including disabled tests. # The command line flag for including disabled tests.
ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests' ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests'
# Command to run the gtest_filter_unittest_ program. # Command to run the googletest-filter-unittest_ program.
COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_') COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-filter-unittest_')
# Regex for determining whether parameterized tests are enabled in the binary. # Regex for determining whether parameterized tests are enabled in the binary.
PARAM_TEST_REGEX = re.compile(r'/ParamTest') PARAM_TEST_REGEX = re.compile(r'/ParamTest')
...@@ -120,7 +118,7 @@ LIST_TESTS_FLAG = '--gtest_list_tests' ...@@ -120,7 +118,7 @@ LIST_TESTS_FLAG = '--gtest_list_tests'
SUPPORTS_DEATH_TESTS = 'HasDeathTest' in gtest_test_utils.Subprocess( SUPPORTS_DEATH_TESTS = 'HasDeathTest' in gtest_test_utils.Subprocess(
[COMMAND, LIST_TESTS_FLAG]).output [COMMAND, LIST_TESTS_FLAG]).output
# Full names of all tests in gtest_filter_unittests_. # Full names of all tests in googletest-filter-unittests_.
PARAM_TESTS = [ PARAM_TESTS = [
'SeqP/ParamTest.TestX/0', 'SeqP/ParamTest.TestX/0',
'SeqP/ParamTest.TestX/1', 'SeqP/ParamTest.TestX/1',
...@@ -292,7 +290,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): ...@@ -292,7 +290,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase):
args=None, check_exit_0=False): args=None, check_exit_0=False):
"""Checks that binary runs correct tests for the given filter and shard. """Checks that binary runs correct tests for the given filter and shard.
Runs all shards of gtest_filter_unittest_ with the given filter, and Runs all shards of googletest-filter-unittest_ with the given filter, and
verifies that the right set of tests were run. The union of tests run verifies that the right set of tests were run. The union of tests run
on each shard should be identical to tests_to_run, without duplicates. on each shard should be identical to tests_to_run, without duplicates.
If check_exit_0, . If check_exit_0, .
...@@ -330,7 +328,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): ...@@ -330,7 +328,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase):
def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run): def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run):
"""Checks that the binary runs correct set of tests for the given filter. """Checks that the binary runs correct set of tests for the given filter.
Runs gtest_filter_unittest_ with the given filter, and enables Runs googletest-filter-unittest_ with the given filter, and enables
disabled tests. Verifies that the right set of tests were run. disabled tests. Verifies that the right set of tests were run.
Args: Args:
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Unit test for Google Test test filters. // Unit test for Google Test test filters.
// //
......
...@@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase): ...@@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
self.assert_(p.exited) self.assert_(p.exited)
self.assertEquals(0, p.exit_code) self.assertEquals(0, p.exit_code)
# TODO(wan@google.com): libtool causes the built test binary to be # FIXME: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of # named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we # gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this # allow both names in the following code. We should remove this
# hack when Chandler Carruth's libtool replacement tool is ready. # when libtool replacement tool is ready.
output_file_name1 = test_name + '.json' output_file_name1 = test_name + '.json'
output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file1 = os.path.join(self.output_dir_, output_file_name1)
output_file_name2 = 'lt-' + output_file_name1 output_file_name2 = 'lt-' + output_file_name1
......
...@@ -46,7 +46,10 @@ GTEST_OUTPUT_FLAG = '--gtest_output' ...@@ -46,7 +46,10 @@ GTEST_OUTPUT_FLAG = '--gtest_output'
GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.json' GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.json'
GTEST_PROGRAM_NAME = 'gtest_xml_output_unittest_' GTEST_PROGRAM_NAME = 'gtest_xml_output_unittest_'
SUPPORTS_STACK_TRACES = False # The flag indicating stacktraces are not supported
NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv
if SUPPORTS_STACK_TRACES: if SUPPORTS_STACK_TRACES:
STACK_TRACE_TEMPLATE = '\nStack trace:\n*' STACK_TRACE_TEMPLATE = '\nStack trace:\n*'
...@@ -607,5 +610,9 @@ class GTestJsonOutputUnitTest(gtest_test_utils.TestCase): ...@@ -607,5 +610,9 @@ class GTestJsonOutputUnitTest(gtest_test_utils.TestCase):
if __name__ == '__main__': if __name__ == '__main__':
if NO_STACKTRACE_SUPPORT_FLAG in sys.argv:
# unittest.main() can't handle unknown flags
sys.argv.remove(NO_STACKTRACE_SUPPORT_FLAG)
os.environ['GTEST_STACK_TRACE_DEPTH'] = '1' os.environ['GTEST_STACK_TRACE_DEPTH'] = '1'
gtest_test_utils.Main() gtest_test_utils.Main()
...@@ -26,13 +26,10 @@ ...@@ -26,13 +26,10 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: Dan Egnor (egnor@google.com)
// Ported to Windows: Vadim Berman (vadimb@google.com)
#include "gtest/internal/gtest-linked_ptr.h"
#include <stdlib.h> #include <stdlib.h>
#include "gtest/internal/gtest-linked_ptr.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace { namespace {
......
...@@ -33,12 +33,10 @@ ...@@ -33,12 +33,10 @@
A user can ask Google Test to list all tests by specifying the A user can ask Google Test to list all tests by specifying the
--gtest_list_tests flag. This script tests such functionality --gtest_list_tests flag. This script tests such functionality
by invoking gtest_list_tests_unittest_ (a program written with by invoking googletest-list-tests-unittest_ (a program written with
Google Test) the command line flags. Google Test) the command line flags.
""" """
__author__ = 'phanna@google.com (Patrick Hanna)'
import re import re
import gtest_test_utils import gtest_test_utils
...@@ -47,10 +45,10 @@ import gtest_test_utils ...@@ -47,10 +45,10 @@ import gtest_test_utils
# The command line flag for enabling/disabling listing all tests. # The command line flag for enabling/disabling listing all tests.
LIST_TESTS_FLAG = 'gtest_list_tests' LIST_TESTS_FLAG = 'gtest_list_tests'
# Path to the gtest_list_tests_unittest_ program. # Path to the googletest-list-tests-unittest_ program.
EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_') EXE_PATH = gtest_test_utils.GetTestExecutablePath('googletest-list-tests-unittest_')
# The expected output when running gtest_list_tests_unittest_ with # The expected output when running googletest-list-tests-unittest_ with
# --gtest_list_tests # --gtest_list_tests
EXPECTED_OUTPUT_NO_FILTER_RE = re.compile(r"""FooDeathTest\. EXPECTED_OUTPUT_NO_FILTER_RE = re.compile(r"""FooDeathTest\.
Test1 Test1
...@@ -94,7 +92,7 @@ MyInstantiation/ValueParamTest\. ...@@ -94,7 +92,7 @@ MyInstantiation/ValueParamTest\.
TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\. TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\.
""") """)
# The expected output when running gtest_list_tests_unittest_ with # The expected output when running googletest-list-tests-unittest_ with
# --gtest_list_tests and --gtest_filter=Foo*. # --gtest_list_tests and --gtest_filter=Foo*.
EXPECTED_OUTPUT_FILTER_FOO_RE = re.compile(r"""FooDeathTest\. EXPECTED_OUTPUT_FILTER_FOO_RE = re.compile(r"""FooDeathTest\.
Test1 Test1
...@@ -114,7 +112,7 @@ FooTest\. ...@@ -114,7 +112,7 @@ FooTest\.
def Run(args): def Run(args):
"""Runs gtest_list_tests_unittest_ and returns the list of tests printed.""" """Runs googletest-list-tests-unittest_ and returns the list of tests printed."""
return gtest_test_utils.Subprocess([EXE_PATH] + args, return gtest_test_utils.Subprocess([EXE_PATH] + args,
capture_stderr=False).output capture_stderr=False).output
...@@ -127,7 +125,7 @@ class GTestListTestsUnitTest(gtest_test_utils.TestCase): ...@@ -127,7 +125,7 @@ class GTestListTestsUnitTest(gtest_test_utils.TestCase):
"""Tests using the --gtest_list_tests flag to list all tests.""" """Tests using the --gtest_list_tests flag to list all tests."""
def RunAndVerify(self, flag_value, expected_output_re, other_flag): def RunAndVerify(self, flag_value, expected_output_re, other_flag):
"""Runs gtest_list_tests_unittest_ and verifies that it prints """Runs googletest-list-tests-unittest_ and verifies that it prints
the correct tests. the correct tests.
Args: Args:
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: phanna@google.com (Patrick Hanna)
// Unit test for Google Test's --gtest_list_tests flag. // Unit test for Google Test's --gtest_list_tests flag.
// //
......
...@@ -25,17 +25,17 @@ ...@@ -25,17 +25,17 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
// //
// The Google C++ Testing and Mocking Framework (Google Test) // The Google C++ Testing and Mocking Framework (Google Test)
// //
// This file verifies Google Test event listeners receive events at the // This file verifies Google Test event listeners receive events at the
// right times. // right times.
#include "gtest/gtest.h"
#include <vector> #include <vector>
#include "gtest/gtest.h"
using ::testing::AddGlobalTestEnvironment; using ::testing::AddGlobalTestEnvironment;
using ::testing::Environment; using ::testing::Environment;
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// //
// Tests for the Message class. // Tests for the Message class.
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
//
// Google Test UnitTestOptions tests // Google Test UnitTestOptions tests
// //
// This file tests classes and functions used internally by // This file tests classes and functions used internally by
...@@ -99,17 +98,16 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { ...@@ -99,17 +98,16 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
const std::string exe_str = GetCurrentExecutableName().string(); const std::string exe_str = GetCurrentExecutableName().string();
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
const bool success = const bool success =
_strcmpi("gtest-options_test", exe_str.c_str()) == 0 || _strcmpi("googletest-options-test", exe_str.c_str()) == 0 ||
_strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 || _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_all_test", exe_str.c_str()) == 0 || _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_dll_test", exe_str.c_str()) == 0; _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
#elif GTEST_OS_FUCHSIA #elif GTEST_OS_FUCHSIA
const bool success = exe_str == "app"; const bool success = exe_str == "app";
#else #else
// TODO(wan@google.com): remove the hard-coded "lt-" prefix when // FIXME: remove the hard-coded "lt-" prefix when libtool replacement is ready
// Chandler Carruth's libtool replacement is ready.
const bool success = const bool success =
exe_str == "gtest-options_test" || exe_str == "googletest-options-test" ||
exe_str == "gtest_all_test" || exe_str == "gtest_all_test" ||
exe_str == "lt-gtest_all_test" || exe_str == "lt-gtest_all_test" ||
exe_str == "gtest_dll_test"; exe_str == "gtest_dll_test";
......
The non-test part of the code is expected to have 2 failures. The non-test part of the code is expected to have 2 failures.
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Value of: false Value of: false
Actual: false Actual: false
Expected: true Expected: true
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
2 2
3 3
...@@ -38,7 +38,7 @@ BarEnvironment::SetUp() called. ...@@ -38,7 +38,7 @@ BarEnvironment::SetUp() called.
[ OK ] PassingTest.PassingTest2 [ OK ] PassingTest.PassingTest2
[----------] 2 tests from NonfatalFailureTest [----------] 2 tests from NonfatalFailureTest
[ RUN ] NonfatalFailureTest.EscapesStringOperands [ RUN ] NonfatalFailureTest.EscapesStringOperands
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
kGoldenString kGoldenString
Which is: "\"Line" Which is: "\"Line"
...@@ -46,7 +46,7 @@ Expected equality of these values: ...@@ -46,7 +46,7 @@ Expected equality of these values:
Which is: "actual \"string\"" Which is: "actual \"string\""
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
golden golden
Which is: "\"Line" Which is: "\"Line"
...@@ -56,7 +56,7 @@ Stack trace: (omitted) ...@@ -56,7 +56,7 @@ Stack trace: (omitted)
[ FAILED ] NonfatalFailureTest.EscapesStringOperands [ FAILED ] NonfatalFailureTest.EscapesStringOperands
[ RUN ] NonfatalFailureTest.DiffForLongStrings [ RUN ] NonfatalFailureTest.DiffForLongStrings
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
golden_str golden_str
Which is: "\"Line\0 1\"\nLine 2" Which is: "\"Line\0 1\"\nLine 2"
...@@ -72,7 +72,7 @@ Stack trace: (omitted) ...@@ -72,7 +72,7 @@ Stack trace: (omitted)
[----------] 3 tests from FatalFailureTest [----------] 3 tests from FatalFailureTest
[ RUN ] FatalFailureTest.FatalFailureInSubroutine [ RUN ] FatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
x x
...@@ -82,7 +82,7 @@ Stack trace: (omitted) ...@@ -82,7 +82,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine [ FAILED ] FatalFailureTest.FatalFailureInSubroutine
[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine [ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
x x
...@@ -92,7 +92,7 @@ Stack trace: (omitted) ...@@ -92,7 +92,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine [ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine [ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false) (expecting a failure on false)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Value of: false Value of: false
Actual: false Actual: false
Expected: true Expected: true
...@@ -104,45 +104,45 @@ Stack trace: (omitted) ...@@ -104,45 +104,45 @@ Stack trace: (omitted)
(expecting 2 failures on (3) >= (a[i])) (expecting 2 failures on (3) >= (a[i]))
i == 0 i == 0
i == 1 i == 1
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9 Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted) Stack trace: (omitted)
i == 2 i == 2
i == 3 i == 3
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6 Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions [ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
[----------] 7 tests from SCOPED_TRACETest [----------] 7 tests from SCOPED_TRACETest
[ RUN ] SCOPED_TRACETest.AcceptedValues [ RUN ] SCOPED_TRACETest.AcceptedValues
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Just checking that all these values work fine. Just checking that all these values work fine.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: (null) googletest-output-test_.cc:#: (null)
gtest_output_test_.cc:#: 1337 googletest-output-test_.cc:#: 1337
gtest_output_test_.cc:#: std::string googletest-output-test_.cc:#: std::string
gtest_output_test_.cc:#: literal string googletest-output-test_.cc:#: literal string
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.AcceptedValues [ FAILED ] SCOPED_TRACETest.AcceptedValues
[ RUN ] SCOPED_TRACETest.ObeysScopes [ RUN ] SCOPED_TRACETest.ObeysScopes
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and shouldn't have a trace. This failure is expected, and shouldn't have a trace.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and should have a trace. This failure is expected, and should have a trace.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Expected trace googletest-output-test_.cc:#: Expected trace
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and shouldn't have a trace. This failure is expected, and shouldn't have a trace.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -150,131 +150,131 @@ Stack trace: (omitted) ...@@ -150,131 +150,131 @@ Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.ObeysScopes [ FAILED ] SCOPED_TRACETest.ObeysScopes
[ RUN ] SCOPED_TRACETest.WorksInLoop [ RUN ] SCOPED_TRACETest.WorksInLoop
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
2 2
n n
Which is: 1 Which is: 1
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: i = 1 googletest-output-test_.cc:#: i = 1
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
n n
Which is: 2 Which is: 2
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: i = 2 googletest-output-test_.cc:#: i = 2
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksInLoop [ FAILED ] SCOPED_TRACETest.WorksInLoop
[ RUN ] SCOPED_TRACETest.WorksInSubroutine [ RUN ] SCOPED_TRACETest.WorksInSubroutine
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
2 2
n n
Which is: 1 Which is: 1
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: n = 1 googletest-output-test_.cc:#: n = 1
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
n n
Which is: 2 Which is: 2
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: n = 2 googletest-output-test_.cc:#: n = 2
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksInSubroutine [ FAILED ] SCOPED_TRACETest.WorksInSubroutine
[ RUN ] SCOPED_TRACETest.CanBeNested [ RUN ] SCOPED_TRACETest.CanBeNested
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
n n
Which is: 2 Which is: 2
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: n = 2 googletest-output-test_.cc:#: n = 2
gtest_output_test_.cc:#: googletest-output-test_.cc:#:
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.CanBeNested [ FAILED ] SCOPED_TRACETest.CanBeNested
[ RUN ] SCOPED_TRACETest.CanBeRepeated [ RUN ] SCOPED_TRACETest.CanBeRepeated
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and should contain trace point A. This failure is expected, and should contain trace point A.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: A googletest-output-test_.cc:#: A
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and should contain trace point A and B. This failure is expected, and should contain trace point A and B.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: B googletest-output-test_.cc:#: B
gtest_output_test_.cc:#: A googletest-output-test_.cc:#: A
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and should contain trace point A, B, and C. This failure is expected, and should contain trace point A, B, and C.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: C googletest-output-test_.cc:#: C
gtest_output_test_.cc:#: B googletest-output-test_.cc:#: B
gtest_output_test_.cc:#: A googletest-output-test_.cc:#: A
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
This failure is expected, and should contain trace point A, B, and D. This failure is expected, and should contain trace point A, B, and D.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: D googletest-output-test_.cc:#: D
gtest_output_test_.cc:#: B googletest-output-test_.cc:#: B
gtest_output_test_.cc:#: A googletest-output-test_.cc:#: A
Stack trace: (omitted) Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.CanBeRepeated [ FAILED ] SCOPED_TRACETest.CanBeRepeated
[ RUN ] SCOPED_TRACETest.WorksConcurrently [ RUN ] SCOPED_TRACETest.WorksConcurrently
(expecting 6 failures) (expecting 6 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #1 (in thread B, only trace B alive). Expected failure #1 (in thread B, only trace B alive).
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Trace B googletest-output-test_.cc:#: Trace B
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #2 (in thread A, trace A & B both alive). Expected failure #2 (in thread A, trace A & B both alive).
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Trace A googletest-output-test_.cc:#: Trace A
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #3 (in thread B, trace A & B both alive). Expected failure #3 (in thread B, trace A & B both alive).
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Trace B googletest-output-test_.cc:#: Trace B
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #4 (in thread B, only trace A alive). Expected failure #4 (in thread B, only trace A alive).
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #5 (in thread A, only trace A alive). Expected failure #5 (in thread A, only trace A alive).
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Trace A googletest-output-test_.cc:#: Trace A
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #6 (in thread A, no trace alive). Expected failure #6 (in thread A, no trace alive).
Stack trace: (omitted) Stack trace: (omitted)
...@@ -282,7 +282,7 @@ Stack trace: (omitted) ...@@ -282,7 +282,7 @@ Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksConcurrently [ FAILED ] SCOPED_TRACETest.WorksConcurrently
[----------] 1 test from ScopedTraceTest [----------] 1 test from ScopedTraceTest
[ RUN ] ScopedTraceTest.WithExplicitFileAndLine [ RUN ] ScopedTraceTest.WithExplicitFileAndLine
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Check that the trace is attached to a particular location. Check that the trace is attached to a particular location.
Google Test trace: Google Test trace:
...@@ -293,27 +293,27 @@ Stack trace: (omitted) ...@@ -293,27 +293,27 @@ Stack trace: (omitted)
[----------] 1 test from NonFatalFailureInFixtureConstructorTest [----------] 1 test from NonFatalFailureInFixtureConstructorTest
[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor [ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 5 failures) (expecting 5 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #1, in the test fixture c'tor. Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #2, in SetUp(). Expected failure #2, in SetUp().
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #3, in the test body. Expected failure #3, in the test body.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #4, in TearDown. Expected failure #4, in TearDown.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #5, in the test fixture d'tor. Expected failure #5, in the test fixture d'tor.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -322,12 +322,12 @@ Stack trace: (omitted) ...@@ -322,12 +322,12 @@ Stack trace: (omitted)
[----------] 1 test from FatalFailureInFixtureConstructorTest [----------] 1 test from FatalFailureInFixtureConstructorTest
[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor [ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 2 failures) (expecting 2 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #1, in the test fixture c'tor. Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #2, in the test fixture d'tor. Expected failure #2, in the test fixture d'tor.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -336,22 +336,22 @@ Stack trace: (omitted) ...@@ -336,22 +336,22 @@ Stack trace: (omitted)
[----------] 1 test from NonFatalFailureInSetUpTest [----------] 1 test from NonFatalFailureInSetUpTest
[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp [ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp
(expecting 4 failures) (expecting 4 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #1, in SetUp(). Expected failure #1, in SetUp().
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #2, in the test function. Expected failure #2, in the test function.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #3, in TearDown(). Expected failure #3, in TearDown().
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #4, in the test fixture d'tor. Expected failure #4, in the test fixture d'tor.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -360,17 +360,17 @@ Stack trace: (omitted) ...@@ -360,17 +360,17 @@ Stack trace: (omitted)
[----------] 1 test from FatalFailureInSetUpTest [----------] 1 test from FatalFailureInSetUpTest
[ RUN ] FatalFailureInSetUpTest.FailureInSetUp [ RUN ] FatalFailureInSetUpTest.FailureInSetUp
(expecting 3 failures) (expecting 3 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #1, in SetUp(). Expected failure #1, in SetUp().
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #2, in TearDown(). Expected failure #2, in TearDown().
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected failure #3, in the test fixture d'tor. Expected failure #3, in the test fixture d'tor.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -483,13 +483,13 @@ Stack trace: (omitted) ...@@ -483,13 +483,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: 2 failures Actual: 2 failures
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure 1. Expected non-fatal failure 1.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure 2. Expected non-fatal failure 2.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -503,7 +503,7 @@ Stack trace: (omitted) ...@@ -503,7 +503,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -548,13 +548,13 @@ Stack trace: (omitted) ...@@ -548,13 +548,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: 2 failures Actual: 2 failures
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -568,7 +568,7 @@ Stack trace: (omitted) ...@@ -568,7 +568,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -597,7 +597,7 @@ Stack trace: (omitted) ...@@ -597,7 +597,7 @@ Stack trace: (omitted)
[ RUN ] TypedTest/0.Success [ RUN ] TypedTest/0.Success
[ OK ] TypedTest/0.Success [ OK ] TypedTest/0.Success
[ RUN ] TypedTest/0.Failure [ RUN ] TypedTest/0.Failure
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
TypeParam() TypeParam()
...@@ -610,7 +610,7 @@ Stack trace: (omitted) ...@@ -610,7 +610,7 @@ Stack trace: (omitted)
[ RUN ] Unsigned/TypedTestP/0.Success [ RUN ] Unsigned/TypedTestP/0.Success
[ OK ] Unsigned/TypedTestP/0.Success [ OK ] Unsigned/TypedTestP/0.Success
[ RUN ] Unsigned/TypedTestP/0.Failure [ RUN ] Unsigned/TypedTestP/0.Failure
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1U 1U
Which is: 1 Which is: 1
...@@ -624,7 +624,7 @@ Stack trace: (omitted) ...@@ -624,7 +624,7 @@ Stack trace: (omitted)
[ RUN ] Unsigned/TypedTestP/1.Success [ RUN ] Unsigned/TypedTestP/1.Success
[ OK ] Unsigned/TypedTestP/1.Success [ OK ] Unsigned/TypedTestP/1.Success
[ RUN ] Unsigned/TypedTestP/1.Failure [ RUN ] Unsigned/TypedTestP/1.Failure
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1U 1U
Which is: 1 Which is: 1
...@@ -640,7 +640,7 @@ Stack trace: (omitted) ...@@ -640,7 +640,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Success: googletest-output-test_.cc:#: Success:
Succeeded Succeeded
Stack trace: (omitted) Stack trace: (omitted)
...@@ -651,7 +651,7 @@ Stack trace: (omitted) ...@@ -651,7 +651,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -663,7 +663,7 @@ Stack trace: (omitted) ...@@ -663,7 +663,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected." Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -677,7 +677,7 @@ Stack trace: (omitted) ...@@ -677,7 +677,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Success: googletest-output-test_.cc:#: Success:
Succeeded Succeeded
Stack trace: (omitted) Stack trace: (omitted)
...@@ -688,7 +688,7 @@ Stack trace: (omitted) ...@@ -688,7 +688,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -700,7 +700,7 @@ Stack trace: (omitted) ...@@ -700,7 +700,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure." Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -714,7 +714,7 @@ Stack trace: (omitted) ...@@ -714,7 +714,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Success: googletest-output-test_.cc:#: Success:
Succeeded Succeeded
Stack trace: (omitted) Stack trace: (omitted)
...@@ -725,7 +725,7 @@ Stack trace: (omitted) ...@@ -725,7 +725,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -737,7 +737,7 @@ Stack trace: (omitted) ...@@ -737,7 +737,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected." Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -751,7 +751,7 @@ Stack trace: (omitted) ...@@ -751,7 +751,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Success: googletest-output-test_.cc:#: Success:
Succeeded Succeeded
Stack trace: (omitted) Stack trace: (omitted)
...@@ -762,7 +762,7 @@ Stack trace: (omitted) ...@@ -762,7 +762,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: googletest-output-test_.cc:#: Fatal failure:
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -774,7 +774,7 @@ Stack trace: (omitted) ...@@ -774,7 +774,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure." Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: googletest-output-test_.cc:#: Non-fatal failure:
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -786,7 +786,7 @@ Stack trace: (omitted) ...@@ -786,7 +786,7 @@ Stack trace: (omitted)
[----------] 2 tests from ExpectFailureWithThreadsTest [----------] 2 tests from ExpectFailureWithThreadsTest
[ RUN ] ExpectFailureWithThreadsTest.ExpectFatalFailure [ RUN ] ExpectFailureWithThreadsTest.ExpectFatalFailure
(expecting 2 failures) (expecting 2 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -799,7 +799,7 @@ Stack trace: (omitted) ...@@ -799,7 +799,7 @@ Stack trace: (omitted)
[ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure [ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure
[ RUN ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure [ RUN ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
(expecting 2 failures) (expecting 2 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -813,12 +813,12 @@ Stack trace: (omitted) ...@@ -813,12 +813,12 @@ Stack trace: (omitted)
[----------] 1 test from ScopedFakeTestPartResultReporterTest [----------] 1 test from ScopedFakeTestPartResultReporterTest
[ RUN ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread [ RUN ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
(expecting 2 failures) (expecting 2 failures)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -826,7 +826,7 @@ Stack trace: (omitted) ...@@ -826,7 +826,7 @@ Stack trace: (omitted)
[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread [ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[----------] 1 test from PrintingFailingParams/FailingParamTest [----------] 1 test from PrintingFailingParams/FailingParamTest
[ RUN ] PrintingFailingParams/FailingParamTest.Fails/0 [ RUN ] PrintingFailingParams/FailingParamTest.Fails/0
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
GetParam() GetParam()
...@@ -838,7 +838,7 @@ Stack trace: (omitted) ...@@ -838,7 +838,7 @@ Stack trace: (omitted)
[ RUN ] PrintingStrings/ParamTest.Success/a [ RUN ] PrintingStrings/ParamTest.Success/a
[ OK ] PrintingStrings/ParamTest.Success/a [ OK ] PrintingStrings/ParamTest.Success/a
[ RUN ] PrintingStrings/ParamTest.Failure/a [ RUN ] PrintingStrings/ParamTest.Failure/a
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
"b" "b"
GetParam() GetParam()
...@@ -849,13 +849,13 @@ Stack trace: (omitted) ...@@ -849,13 +849,13 @@ Stack trace: (omitted)
[ FAILED ] PrintingStrings/ParamTest.Failure/a, where GetParam() = "a" [ FAILED ] PrintingStrings/ParamTest.Failure/a, where GetParam() = "a"
[----------] Global test environment tear-down [----------] Global test environment tear-down
BarEnvironment::TearDown() called. BarEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected non-fatal failure. Expected non-fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
FooEnvironment::TearDown() called. FooEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Failed Failed
Expected fatal failure. Expected fatal failure.
Stack trace: (omitted) Stack trace: (omitted)
...@@ -919,7 +919,7 @@ Stack trace: (omitted) ...@@ -919,7 +919,7 @@ Stack trace: (omitted)
[----------] 3 tests from FatalFailureTest [----------] 3 tests from FatalFailureTest
[ RUN ] FatalFailureTest.FatalFailureInSubroutine [ RUN ] FatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
x x
...@@ -929,7 +929,7 @@ Stack trace: (omitted) ...@@ -929,7 +929,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms) [ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms)
[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine [ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected equality of these values: Expected equality of these values:
1 1
x x
...@@ -939,7 +939,7 @@ Stack trace: (omitted) ...@@ -939,7 +939,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms) [ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms)
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine [ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false) (expecting a failure on false)
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Value of: false Value of: false
Actual: false Actual: false
Expected: true Expected: true
...@@ -953,13 +953,13 @@ Stack trace: (omitted) ...@@ -953,13 +953,13 @@ Stack trace: (omitted)
(expecting 2 failures on (3) >= (a[i])) (expecting 2 failures on (3) >= (a[i]))
i == 0 i == 0
i == 1 i == 1
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9 Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted) Stack trace: (omitted)
i == 2 i == 2
i == 3 i == 3
gtest_output_test_.cc:#: Failure googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6 Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted) Stack trace: (omitted)
......
...@@ -31,16 +31,13 @@ ...@@ -31,16 +31,13 @@
"""Tests the text output of Google C++ Testing and Mocking Framework. """Tests the text output of Google C++ Testing and Mocking Framework.
To update the golden file:
SYNOPSIS googletest_output_test.py --build_dir=BUILD/DIR --gengolden
gtest_output_test.py --build_dir=BUILD/DIR --gengolden where BUILD/DIR contains the built googletest-output-test_ file.
# where BUILD/DIR contains the built gtest_output_test_ file. googletest_output_test.py --gengolden
gtest_output_test.py --gengolden googletest_output_test.py
gtest_output_test.py
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import difflib import difflib
import os import os
import re import re
...@@ -58,10 +55,10 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support' ...@@ -58,10 +55,10 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS = os.name == 'nt' IS_WINDOWS = os.name == 'nt'
# TODO(vladl@google.com): remove the _lin suffix. # FIXME: remove the _lin suffix.
GOLDEN_NAME = 'gtest_output_test_golden_lin.txt' GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_') PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')
# At least one command we exercise must not have the # At least one command we exercise must not have the
# 'internal_skip_environment_and_ad_hoc_tests' argument. # 'internal_skip_environment_and_ad_hoc_tests' argument.
...@@ -104,7 +101,7 @@ def RemoveLocations(test_output): ...@@ -104,7 +101,7 @@ def RemoveLocations(test_output):
'FILE_NAME:#: '. 'FILE_NAME:#: '.
""" """
return re.sub(r'.*[/\\]((gtest_output_test_|gtest).cc)(\:\d+|\(\d+\))\: ', return re.sub(r'.*[/\\]((googletest-output-test_|gtest).cc)(\:\d+|\(\d+\))\: ',
r'\1:#: ', test_output) r'\1:#: ', test_output)
...@@ -195,7 +192,7 @@ def RemoveMatchingTests(test_output, pattern): ...@@ -195,7 +192,7 @@ def RemoveMatchingTests(test_output, pattern):
def NormalizeOutput(output): def NormalizeOutput(output):
"""Normalizes output (the output of gtest_output_test_.exe).""" """Normalizes output (the output of googletest-output-test_.exe)."""
output = ToUnixLineEnding(output) output = ToUnixLineEnding(output)
output = RemoveLocations(output) output = RemoveLocations(output)
...@@ -316,11 +313,11 @@ class GTestOutputTest(gtest_test_utils.TestCase): ...@@ -316,11 +313,11 @@ class GTestOutputTest(gtest_test_utils.TestCase):
if os.getenv('DEBUG_GTEST_OUTPUT_TEST'): if os.getenv('DEBUG_GTEST_OUTPUT_TEST'):
open(os.path.join( open(os.path.join(
gtest_test_utils.GetSourceDir(), gtest_test_utils.GetSourceDir(),
'_gtest_output_test_normalized_actual.txt'), 'wb').write( '_googletest-output-test_normalized_actual.txt'), 'wb').write(
normalized_actual) normalized_actual)
open(os.path.join( open(os.path.join(
gtest_test_utils.GetSourceDir(), gtest_test_utils.GetSourceDir(),
'_gtest_output_test_normalized_golden.txt'), 'wb').write( '_googletest-output-test_normalized_golden.txt'), 'wb').write(
normalized_golden) normalized_golden)
self.assertEqual(normalized_golden, normalized_actual) self.assertEqual(normalized_golden, normalized_actual)
......
...@@ -29,11 +29,9 @@ ...@@ -29,11 +29,9 @@
// //
// The purpose of this file is to generate Google Test output under // The purpose of this file is to generate Google Test output under
// various conditions. The output will then be verified by // various conditions. The output will then be verified by
// gtest_output_test.py to ensure that Google Test generates the // googletest-output-test.py to ensure that Google Test generates the
// desired messages. Therefore, most tests in this file are MEANT TO // desired messages. Therefore, most tests in this file are MEANT TO
// FAIL. // FAIL.
//
// Author: wan@google.com (Zhanyong Wan)
#include "gtest/gtest-spi.h" #include "gtest/gtest-spi.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
#!/usr/bin/env python
#
# Copyright 2015 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.
"""Verifies that Google Test warns the user when not initialized properly."""
import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name1-test_'
COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name)
def Assert(condition):
if not condition:
raise AssertionError
def TestExitCodeAndOutput(command):
"""Runs the given command and verifies its exit code and output."""
err = ('Parameterized test name \'"InvalidWithQuotes"\' is invalid')
p = gtest_test_utils.Subprocess(command)
Assert(p.terminated_by_signal)
# Verify the output message contains appropriate output
Assert(err in p.output)
class GTestParamTestInvalidName1Test(gtest_test_utils.TestCase):
def testExitCodeAndOutput(self):
TestExitCodeAndOutput(COMMAND)
if __name__ == '__main__':
gtest_test_utils.Main()
// Copyright 2015, 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.
#include "gtest/gtest.h"
namespace {
class DummyTest : public ::testing::TestWithParam<const char *> {};
TEST_P(DummyTest, Dummy) {
}
INSTANTIATE_TEST_CASE_P(InvalidTestName,
DummyTest,
::testing::Values("InvalidWithQuotes"),
::testing::PrintToStringParamName());
} // namespace
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment