diff options
author | David Schuldenfrei <david.schuldenfrei@gmail.com> | 2018-08-27 15:55:01 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-08-27 16:22:33 (GMT) |
commit | 603ce4b81df48a268b84d0e4f2b999b89b903250 (patch) | |
tree | b1ae525fe5312513b29883ad4ae8c6ed2f3e6e27 /googletest/test/gtest_list_output_unittest_.cc | |
parent | a0e62d9f1a5f24cbc9d16bb9d1c4b606e960b2af (diff) | |
download | googletest-603ce4b81df48a268b84d0e4f2b999b89b903250.zip googletest-603ce4b81df48a268b84d0e4f2b999b89b903250.tar.gz googletest-603ce4b81df48a268b84d0e4f2b999b89b903250.tar.bz2 |
Merge 72a2836945e7a3dcee0730166704587e10bf64ee into 1d9a1912e7f42e8ae66ea365b5b8508fecb31509
Closes #1658
Review and changes, mister@google.com
PiperOrigin-RevId: 210374286
Diffstat (limited to 'googletest/test/gtest_list_output_unittest_.cc')
-rw-r--r-- | googletest/test/gtest_list_output_unittest_.cc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/googletest/test/gtest_list_output_unittest_.cc b/googletest/test/gtest_list_output_unittest_.cc new file mode 100644 index 0000000..b1c7b4d --- /dev/null +++ b/googletest/test/gtest_list_output_unittest_.cc @@ -0,0 +1,51 @@ +// Copyright 2018, 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: david.schuldenfrei@gmail.com (David Schuldenfrei) + +// Unit test for Google Test's --gtest_list_tests and --gtest_output flag. +// +// A user can ask Google Test to list all tests that will run, +// and have the output saved in a Json/Xml file. +// The tests will not be run after listing. +// +// This program will be invoked from a Python unit test. +// Don't run it directly. + +#include "gtest/gtest.h" + +TEST(FooTest, Test1) {} + +TEST(FooTest, Test2) {} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} |