1da1a9eb0SAlan Somers // Copyright 2008 Google Inc.
2da1a9eb0SAlan Somers // All Rights Reserved.
3da1a9eb0SAlan Somers //
4da1a9eb0SAlan Somers // Redistribution and use in source and binary forms, with or without
5da1a9eb0SAlan Somers // modification, are permitted provided that the following conditions are
6da1a9eb0SAlan Somers // met:
7da1a9eb0SAlan Somers //
8da1a9eb0SAlan Somers //     * Redistributions of source code must retain the above copyright
9da1a9eb0SAlan Somers // notice, this list of conditions and the following disclaimer.
10da1a9eb0SAlan Somers //     * Redistributions in binary form must reproduce the above
11da1a9eb0SAlan Somers // copyright notice, this list of conditions and the following disclaimer
12da1a9eb0SAlan Somers // in the documentation and/or other materials provided with the
13da1a9eb0SAlan Somers // distribution.
14da1a9eb0SAlan Somers //     * Neither the name of Google Inc. nor the names of its
15da1a9eb0SAlan Somers // contributors may be used to endorse or promote products derived from
16da1a9eb0SAlan Somers // this software without specific prior written permission.
17da1a9eb0SAlan Somers //
18da1a9eb0SAlan Somers // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19da1a9eb0SAlan Somers // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20da1a9eb0SAlan Somers // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21da1a9eb0SAlan Somers // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22da1a9eb0SAlan Somers // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23da1a9eb0SAlan Somers // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24da1a9eb0SAlan Somers // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25da1a9eb0SAlan Somers // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26da1a9eb0SAlan Somers // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27da1a9eb0SAlan Somers // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28da1a9eb0SAlan Somers // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29da1a9eb0SAlan Somers //
30da1a9eb0SAlan Somers // Author: arseny.aprelev@gmail.com (Arseny Aprelev)
31da1a9eb0SAlan Somers //
32da1a9eb0SAlan Somers 
33da1a9eb0SAlan Somers #include "gtest/gtest.h"
34da1a9eb0SAlan Somers 
35da1a9eb0SAlan Somers using ::testing::Test;
36da1a9eb0SAlan Somers 
TEST(SkipTest,DoesSkip)37da1a9eb0SAlan Somers TEST(SkipTest, DoesSkip) {
3828f6c2f2SEnji Cooper   GTEST_SKIP() << "skipping single test";
39da1a9eb0SAlan Somers   EXPECT_EQ(0, 1);
40da1a9eb0SAlan Somers }
41da1a9eb0SAlan Somers 
42da1a9eb0SAlan Somers class Fixture : public Test {
43da1a9eb0SAlan Somers  protected:
SetUp()44da1a9eb0SAlan Somers   void SetUp() override {
45da1a9eb0SAlan Somers     GTEST_SKIP() << "skipping all tests for this fixture";
46da1a9eb0SAlan Somers   }
47da1a9eb0SAlan Somers };
48da1a9eb0SAlan Somers 
TEST_F(Fixture,SkipsOneTest)4928f6c2f2SEnji Cooper TEST_F(Fixture, SkipsOneTest) { EXPECT_EQ(5, 7); }
50da1a9eb0SAlan Somers 
TEST_F(Fixture,SkipsAnotherTest)5128f6c2f2SEnji Cooper TEST_F(Fixture, SkipsAnotherTest) { EXPECT_EQ(99, 100); }
52