1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "detector.h" 17 #include <gtest/gtest.h> 18 19 using namespace testing::ext; 20 21 class DetectorDependTest : public testing::Test { 22 public: 23 static void SetUpTestCase(void); 24 static void TearDownTestCase(void); 25 void SetUp(); 26 void TearDown(); 27 }; 28 SetUpTestCase(void)29void DetectorDependTest::SetUpTestCase(void) 30 { 31 // step 2: input testsuit setup step 32 } 33 TearDownTestCase(void)34void DetectorDependTest::TearDownTestCase(void) 35 { 36 // step 2: input testsuit teardown step 37 } 38 SetUp(void)39void DetectorDependTest::SetUp(void) 40 { 41 // step 3: input testcase setup step 42 } 43 TearDown(void)44void DetectorDependTest::TearDown(void) 45 { 46 // step 3: input testcase teardown step 47 } 48 49 /** 50 * @tc.name: TestPoint_001 51 * @tc.desc: detection prime number 52 * @tc.type: FUNC 53 * @tc.require: AR00000000 SR00000000 54 */ 55 HWTEST_F(DetectorDependTest, TestPoint_001, TestSize.Level1) 56 { 57 // step 1: testcase step 1 description 58 EXPECT_TRUE(IsPrime(7)); 59 60 // step 2: testcase step 2 description 61 EXPECT_TRUE(IsPrime(3)); 62 } 63