• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef ACELITE_SWIPER_TDD_TEST_H
16 #define ACELITE_SWIPER_TDD_TEST_H
17 
18 #ifdef TDD_ASSERTIONS
19 #include <climits>
20 #include <gtest/gtest.h>
21 #else
22 #include <typeinfo.h>
23 #endif
24 
25 #include "acelite_config.h"
26 #include "component_factory.h"
27 #include "root_component_mock.h"
28 #include "test_common.h"
29 
30 namespace OHOS {
31 namespace ACELite {
32 #ifdef TDD_ASSERTIONS
33 using namespace std;
34 using namespace testing::ext;
35 class SwiperTddTest : public testing::Test {
36 #else
37 class SwiperTddTest {
38 #endif
39 public:
40     SwiperTddTest();
~SwiperTddTest()41     ~SwiperTddTest() {}
42     void SetUp();
43     void TearDown();
44     void ComponentSwiperAttributeSetTest001();
45     void ComponentSwiperAttributeSetTest002();
46     void ComponentSwiperAttributeSetTest003();
47     void ComponentSwiperAttributeSetTest004();
48     void ComponentSwiperAttributeSetTest005();
49     void ComponentSwiperAttributeSetTest013();
50     void ComponentSwiperAttributeSetTest014();
51     void ComponentSwiperAttributeSetTest019();
52     void RunTests();
53     jerry_value_t optionsObj_;
54     jerry_value_t attrsObj_;
55     jerry_value_t styleObj_;
56     jerry_value_t eventObj_;
57     jerry_value_t childrenObj_;
58     Component* stack1_;
59     Component* stack2_;
60     Component* stack3_;
61     uint16_t componentKeyId_ = KeyParser::ParseKeyId("swiper");
62 
63 private:
64     RootComponentMock rootComponentMock_;
65 };
66 } // namespace ACELite
67 } // namespace OHOS
68 #endif // ACELITE_SWIPER_TDD_TEST_H
69