1 /*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <gtest/gtest.h>
18
19 #include <stdlib.h>
20
21 #include "TestExtensions.h"
22
23 namespace android {
24 namespace camera2 {
25 namespace tests {
26
27 // Intentionally disabled since 2 of these tests are supposed to fail
28 class DISABLED_ForkedTest : public ::testing::Test {
29
SetUp()30 virtual void SetUp() {
31 TEST_EXTENSION_FORKING_SET_UP;
32 }
33
TearDown()34 virtual void TearDown() {
35 TEST_EXTENSION_FORKING_TEAR_DOWN;
36 }
37 };
38
39 // intentionally fail
TEST_F(DISABLED_ForkedTest,FailCrash)40 TEST_F(DISABLED_ForkedTest, FailCrash) {
41 TEST_EXTENSION_FORKING_INIT;
42 abort();
43 }
44
TEST_F(DISABLED_ForkedTest,SucceedNormal)45 TEST_F(DISABLED_ForkedTest, SucceedNormal) {
46 TEST_EXTENSION_FORKING_INIT;
47
48 EXPECT_TRUE(true);
49 }
50
51 // intentionally fail
TEST_F(DISABLED_ForkedTest,FailNormal)52 TEST_F(DISABLED_ForkedTest, FailNormal) {
53 TEST_EXTENSION_FORKING_INIT;
54
55 EXPECT_TRUE(false);
56 }
57
58 }
59 }
60 }
61
62