123b3eb3cSopenharmony_ci/*
223b3eb3cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License.
523b3eb3cSopenharmony_ci * You may obtain a copy of the License at
623b3eb3cSopenharmony_ci *
723b3eb3cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
823b3eb3cSopenharmony_ci *
923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and
1323b3eb3cSopenharmony_ci * limitations under the License.
1423b3eb3cSopenharmony_ci */
1523b3eb3cSopenharmony_ci
1623b3eb3cSopenharmony_ci#include "animate_impl.h"
1723b3eb3cSopenharmony_ci#include "event_converter.h"
1823b3eb3cSopenharmony_ci#include "gtest/gtest.h"
1923b3eb3cSopenharmony_ci#include "native_animate.h"
2023b3eb3cSopenharmony_ci#include "native_interface.h"
2123b3eb3cSopenharmony_ci#include "native_node.h"
2223b3eb3cSopenharmony_ci#include "node_transition.h"
2323b3eb3cSopenharmony_ci
2423b3eb3cSopenharmony_ciusing namespace testing;
2523b3eb3cSopenharmony_ciusing namespace testing::ext;
2623b3eb3cSopenharmony_ci
2723b3eb3cSopenharmony_ciclass NodeTransitionTest : public testing::Test {
2823b3eb3cSopenharmony_cipublic:
2923b3eb3cSopenharmony_ci    static void SetUpTestCase() {};
3023b3eb3cSopenharmony_ci    static void TearDownTestCase() {};
3123b3eb3cSopenharmony_ci};
3223b3eb3cSopenharmony_ci
3323b3eb3cSopenharmony_ci/**
3423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest001
3523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
3623b3eb3cSopenharmony_ci * @tc.type: FUNC
3723b3eb3cSopenharmony_ci */
3823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest001, TestSize.Level1)
3923b3eb3cSopenharmony_ci{
4023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
4123b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
4223b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
4323b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
4423b3eb3cSopenharmony_ci
4523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
4623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
4723b3eb3cSopenharmony_ci    option = nullptr;
4823b3eb3cSopenharmony_ci}
4923b3eb3cSopenharmony_ci
5023b3eb3cSopenharmony_ci/**
5123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest002
5223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
5323b3eb3cSopenharmony_ci * @tc.type: FUNC
5423b3eb3cSopenharmony_ci */
5523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest002, TestSize.Level1)
5623b3eb3cSopenharmony_ci{
5723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
5823b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
5923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
6023b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
6123b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
6223b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
6323b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
6423b3eb3cSopenharmony_ci
6523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
6623b3eb3cSopenharmony_ci    combine = nullptr;
6723b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
6823b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
6923b3eb3cSopenharmony_ci    option = nullptr;
7023b3eb3cSopenharmony_ci}
7123b3eb3cSopenharmony_ci
7223b3eb3cSopenharmony_ci/**
7323b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest003
7423b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
7523b3eb3cSopenharmony_ci * @tc.type: FUNC
7623b3eb3cSopenharmony_ci */
7723b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest003, TestSize.Level1)
7823b3eb3cSopenharmony_ci{
7923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
8023b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
8123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
8223b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
8323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
8423b3eb3cSopenharmony_ci
8523b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
8623b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
8723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
8823b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
8923b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
9023b3eb3cSopenharmony_ci
9123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
9223b3eb3cSopenharmony_ci    animation = nullptr;
9323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
9423b3eb3cSopenharmony_ci    combine = nullptr;
9523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
9623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
9723b3eb3cSopenharmony_ci    option = nullptr;
9823b3eb3cSopenharmony_ci}
9923b3eb3cSopenharmony_ci
10023b3eb3cSopenharmony_ci/**
10123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest004
10223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
10323b3eb3cSopenharmony_ci * @tc.type: FUNC
10423b3eb3cSopenharmony_ci */
10523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest004, TestSize.Level1)
10623b3eb3cSopenharmony_ci{
10723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
10823b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
10923b3eb3cSopenharmony_ci
11023b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
11123b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
11223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
11323b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
11423b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
11523b3eb3cSopenharmony_ci
11623b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
11723b3eb3cSopenharmony_ci    animation = nullptr;
11823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
11923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
12023b3eb3cSopenharmony_ci    option = nullptr;
12123b3eb3cSopenharmony_ci}
12223b3eb3cSopenharmony_ci
12323b3eb3cSopenharmony_ci/**
12423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest005
12523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
12623b3eb3cSopenharmony_ci * @tc.type: FUNC
12723b3eb3cSopenharmony_ci */
12823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest005, TestSize.Level1)
12923b3eb3cSopenharmony_ci{
13023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
13123b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
13223b3eb3cSopenharmony_ci
13323b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
13423b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
13523b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
13623b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
13723b3eb3cSopenharmony_ci
13823b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
13923b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
14023b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
14123b3eb3cSopenharmony_ci
14223b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
14323b3eb3cSopenharmony_ci    animation = nullptr;
14423b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
14523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
14623b3eb3cSopenharmony_ci    option = nullptr;
14723b3eb3cSopenharmony_ci}
14823b3eb3cSopenharmony_ci
14923b3eb3cSopenharmony_ci/**
15023b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest006
15123b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
15223b3eb3cSopenharmony_ci * @tc.type: FUNC
15323b3eb3cSopenharmony_ci */
15423b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest006, TestSize.Level1)
15523b3eb3cSopenharmony_ci{
15623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
15723b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
15823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
15923b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
16023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
16123b3eb3cSopenharmony_ci
16223b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
16323b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
16423b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
16523b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
16623b3eb3cSopenharmony_ci
16723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
16823b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
16923b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
17023b3eb3cSopenharmony_ci
17123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
17223b3eb3cSopenharmony_ci    animation = nullptr;
17323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
17423b3eb3cSopenharmony_ci    combine = nullptr;
17523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
17623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
17723b3eb3cSopenharmony_ci    option = nullptr;
17823b3eb3cSopenharmony_ci}
17923b3eb3cSopenharmony_ci
18023b3eb3cSopenharmony_ci/**
18123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest007
18223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
18323b3eb3cSopenharmony_ci * @tc.type: FUNC
18423b3eb3cSopenharmony_ci */
18523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest007, TestSize.Level1)
18623b3eb3cSopenharmony_ci{
18723b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
18823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
18923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
19023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
19123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
19223b3eb3cSopenharmony_ci
19323b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
19423b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
19523b3eb3cSopenharmony_ci    option = nullptr;
19623b3eb3cSopenharmony_ci}
19723b3eb3cSopenharmony_ci
19823b3eb3cSopenharmony_ci/**
19923b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest008
20023b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
20123b3eb3cSopenharmony_ci * @tc.type: FUNC
20223b3eb3cSopenharmony_ci */
20323b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest008, TestSize.Level1)
20423b3eb3cSopenharmony_ci{
20523b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
20623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
20723b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
20823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
20923b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
21023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
21123b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
21223b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
21323b3eb3cSopenharmony_ci
21423b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
21523b3eb3cSopenharmony_ci    combine = nullptr;
21623b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
21723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
21823b3eb3cSopenharmony_ci    option = nullptr;
21923b3eb3cSopenharmony_ci}
22023b3eb3cSopenharmony_ci
22123b3eb3cSopenharmony_ci/**
22223b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest009
22323b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
22423b3eb3cSopenharmony_ci * @tc.type: FUNC
22523b3eb3cSopenharmony_ci */
22623b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest009, TestSize.Level1)
22723b3eb3cSopenharmony_ci{
22823b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
22923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
23023b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
23123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
23223b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
23323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
23423b3eb3cSopenharmony_ci
23523b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
23623b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
23723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
23823b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
23923b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
24023b3eb3cSopenharmony_ci
24123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
24223b3eb3cSopenharmony_ci    animation = nullptr;
24323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
24423b3eb3cSopenharmony_ci    combine = nullptr;
24523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
24623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
24723b3eb3cSopenharmony_ci    option = nullptr;
24823b3eb3cSopenharmony_ci}
24923b3eb3cSopenharmony_ci
25023b3eb3cSopenharmony_ci/**
25123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest010
25223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
25323b3eb3cSopenharmony_ci * @tc.type: FUNC
25423b3eb3cSopenharmony_ci */
25523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest010, TestSize.Level1)
25623b3eb3cSopenharmony_ci{
25723b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
25823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
25923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
26023b3eb3cSopenharmony_ci
26123b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
26223b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
26323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
26423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
26523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
26623b3eb3cSopenharmony_ci
26723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
26823b3eb3cSopenharmony_ci    animation = nullptr;
26923b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
27023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
27123b3eb3cSopenharmony_ci    option = nullptr;
27223b3eb3cSopenharmony_ci}
27323b3eb3cSopenharmony_ci
27423b3eb3cSopenharmony_ci/**
27523b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest011
27623b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
27723b3eb3cSopenharmony_ci * @tc.type: FUNC
27823b3eb3cSopenharmony_ci */
27923b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest011, TestSize.Level1)
28023b3eb3cSopenharmony_ci{
28123b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
28223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
28323b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
28423b3eb3cSopenharmony_ci
28523b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
28623b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
28723b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
28823b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
28923b3eb3cSopenharmony_ci
29023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
29123b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
29223b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
29323b3eb3cSopenharmony_ci
29423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
29523b3eb3cSopenharmony_ci    animation = nullptr;
29623b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
29723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
29823b3eb3cSopenharmony_ci    option = nullptr;
29923b3eb3cSopenharmony_ci}
30023b3eb3cSopenharmony_ci
30123b3eb3cSopenharmony_ci/**
30223b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest012
30323b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
30423b3eb3cSopenharmony_ci * @tc.type: FUNC
30523b3eb3cSopenharmony_ci */
30623b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest012, TestSize.Level1)
30723b3eb3cSopenharmony_ci{
30823b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
30923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
31023b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
31123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
31223b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
31323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
31423b3eb3cSopenharmony_ci
31523b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
31623b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
31723b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
31823b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
31923b3eb3cSopenharmony_ci
32023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
32123b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
32223b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
32323b3eb3cSopenharmony_ci
32423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
32523b3eb3cSopenharmony_ci    animation = nullptr;
32623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
32723b3eb3cSopenharmony_ci    combine = nullptr;
32823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
32923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
33023b3eb3cSopenharmony_ci    option = nullptr;
33123b3eb3cSopenharmony_ci}
33223b3eb3cSopenharmony_ci
33323b3eb3cSopenharmony_ci/**
33423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest013
33523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
33623b3eb3cSopenharmony_ci * @tc.type: FUNC
33723b3eb3cSopenharmony_ci */
33823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest013, TestSize.Level1)
33923b3eb3cSopenharmony_ci{
34023b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
34123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
34223b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
34323b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
34423b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
34523b3eb3cSopenharmony_ci
34623b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
34723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
34823b3eb3cSopenharmony_ci    option = nullptr;
34923b3eb3cSopenharmony_ci}
35023b3eb3cSopenharmony_ci
35123b3eb3cSopenharmony_ci/**
35223b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest014
35323b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
35423b3eb3cSopenharmony_ci * @tc.type: FUNC
35523b3eb3cSopenharmony_ci */
35623b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest014, TestSize.Level1)
35723b3eb3cSopenharmony_ci{
35823b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
35923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
36023b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
36123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
36223b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
36323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
36423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
36523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
36623b3eb3cSopenharmony_ci
36723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
36823b3eb3cSopenharmony_ci    combine = nullptr;
36923b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
37023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
37123b3eb3cSopenharmony_ci    option = nullptr;
37223b3eb3cSopenharmony_ci}
37323b3eb3cSopenharmony_ci
37423b3eb3cSopenharmony_ci/**
37523b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest015
37623b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
37723b3eb3cSopenharmony_ci * @tc.type: FUNC
37823b3eb3cSopenharmony_ci */
37923b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest015, TestSize.Level1)
38023b3eb3cSopenharmony_ci{
38123b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
38223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
38323b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
38423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
38523b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
38623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
38723b3eb3cSopenharmony_ci
38823b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
38923b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
39023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
39123b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
39223b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
39323b3eb3cSopenharmony_ci
39423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
39523b3eb3cSopenharmony_ci    animation = nullptr;
39623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
39723b3eb3cSopenharmony_ci    combine = nullptr;
39823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
39923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
40023b3eb3cSopenharmony_ci    option = nullptr;
40123b3eb3cSopenharmony_ci}
40223b3eb3cSopenharmony_ci
40323b3eb3cSopenharmony_ci/**
40423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest016
40523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
40623b3eb3cSopenharmony_ci * @tc.type: FUNC
40723b3eb3cSopenharmony_ci */
40823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest016, TestSize.Level1)
40923b3eb3cSopenharmony_ci{
41023b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
41123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
41223b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
41323b3eb3cSopenharmony_ci
41423b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
41523b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
41623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
41723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
41823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
41923b3eb3cSopenharmony_ci
42023b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
42123b3eb3cSopenharmony_ci    animation = nullptr;
42223b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
42323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
42423b3eb3cSopenharmony_ci    option = nullptr;
42523b3eb3cSopenharmony_ci}
42623b3eb3cSopenharmony_ci
42723b3eb3cSopenharmony_ci/**
42823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest017
42923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
43023b3eb3cSopenharmony_ci * @tc.type: FUNC
43123b3eb3cSopenharmony_ci */
43223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest017, TestSize.Level1)
43323b3eb3cSopenharmony_ci{
43423b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
43523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
43623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
43723b3eb3cSopenharmony_ci
43823b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
43923b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
44023b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
44123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
44223b3eb3cSopenharmony_ci
44323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
44423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
44523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
44623b3eb3cSopenharmony_ci
44723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
44823b3eb3cSopenharmony_ci    animation = nullptr;
44923b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
45023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
45123b3eb3cSopenharmony_ci    option = nullptr;
45223b3eb3cSopenharmony_ci}
45323b3eb3cSopenharmony_ci
45423b3eb3cSopenharmony_ci/**
45523b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest018
45623b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
45723b3eb3cSopenharmony_ci * @tc.type: FUNC
45823b3eb3cSopenharmony_ci */
45923b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest018, TestSize.Level1)
46023b3eb3cSopenharmony_ci{
46123b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
46223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
46323b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
46423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
46523b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
46623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
46723b3eb3cSopenharmony_ci
46823b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
46923b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
47023b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
47123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
47223b3eb3cSopenharmony_ci
47323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
47423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
47523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
47623b3eb3cSopenharmony_ci
47723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
47823b3eb3cSopenharmony_ci    animation = nullptr;
47923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
48023b3eb3cSopenharmony_ci    combine = nullptr;
48123b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
48223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
48323b3eb3cSopenharmony_ci    option = nullptr;
48423b3eb3cSopenharmony_ci}
48523b3eb3cSopenharmony_ci
48623b3eb3cSopenharmony_ci/**
48723b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest019
48823b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
48923b3eb3cSopenharmony_ci * @tc.type: FUNC
49023b3eb3cSopenharmony_ci */
49123b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest019, TestSize.Level1)
49223b3eb3cSopenharmony_ci{
49323b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
49423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
49523b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
49623b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
49723b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
49823b3eb3cSopenharmony_ci
49923b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
50023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
50123b3eb3cSopenharmony_ci    option = nullptr;
50223b3eb3cSopenharmony_ci}
50323b3eb3cSopenharmony_ci
50423b3eb3cSopenharmony_ci/**
50523b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest020
50623b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
50723b3eb3cSopenharmony_ci * @tc.type: FUNC
50823b3eb3cSopenharmony_ci */
50923b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest020, TestSize.Level1)
51023b3eb3cSopenharmony_ci{
51123b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
51223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
51323b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
51423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
51523b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
51623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
51723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
51823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
51923b3eb3cSopenharmony_ci
52023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
52123b3eb3cSopenharmony_ci    combine = nullptr;
52223b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
52323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
52423b3eb3cSopenharmony_ci    option = nullptr;
52523b3eb3cSopenharmony_ci}
52623b3eb3cSopenharmony_ci
52723b3eb3cSopenharmony_ci/**
52823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest021
52923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
53023b3eb3cSopenharmony_ci * @tc.type: FUNC
53123b3eb3cSopenharmony_ci */
53223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest021, TestSize.Level1)
53323b3eb3cSopenharmony_ci{
53423b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
53523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
53623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
53723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
53823b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
53923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
54023b3eb3cSopenharmony_ci
54123b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
54223b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
54323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
54423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
54523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
54623b3eb3cSopenharmony_ci
54723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
54823b3eb3cSopenharmony_ci    animation = nullptr;
54923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
55023b3eb3cSopenharmony_ci    combine = nullptr;
55123b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
55223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
55323b3eb3cSopenharmony_ci    option = nullptr;
55423b3eb3cSopenharmony_ci}
55523b3eb3cSopenharmony_ci
55623b3eb3cSopenharmony_ci/**
55723b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest022
55823b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
55923b3eb3cSopenharmony_ci * @tc.type: FUNC
56023b3eb3cSopenharmony_ci */
56123b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest022, TestSize.Level1)
56223b3eb3cSopenharmony_ci{
56323b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
56423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
56523b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
56623b3eb3cSopenharmony_ci
56723b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
56823b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
56923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
57023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
57123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
57223b3eb3cSopenharmony_ci
57323b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
57423b3eb3cSopenharmony_ci    animation = nullptr;
57523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
57623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
57723b3eb3cSopenharmony_ci    option = nullptr;
57823b3eb3cSopenharmony_ci}
57923b3eb3cSopenharmony_ci
58023b3eb3cSopenharmony_ci/**
58123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest023
58223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
58323b3eb3cSopenharmony_ci * @tc.type: FUNC
58423b3eb3cSopenharmony_ci */
58523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest023, TestSize.Level1)
58623b3eb3cSopenharmony_ci{
58723b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
58823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
58923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
59023b3eb3cSopenharmony_ci
59123b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
59223b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
59323b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
59423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
59523b3eb3cSopenharmony_ci
59623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
59723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
59823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
59923b3eb3cSopenharmony_ci
60023b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
60123b3eb3cSopenharmony_ci    animation = nullptr;
60223b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
60323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
60423b3eb3cSopenharmony_ci    option = nullptr;
60523b3eb3cSopenharmony_ci}
60623b3eb3cSopenharmony_ci
60723b3eb3cSopenharmony_ci/**
60823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest024
60923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
61023b3eb3cSopenharmony_ci * @tc.type: FUNC
61123b3eb3cSopenharmony_ci */
61223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest024, TestSize.Level1)
61323b3eb3cSopenharmony_ci{
61423b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
61523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
61623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
61723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
61823b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
61923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
62023b3eb3cSopenharmony_ci
62123b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
62223b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
62323b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
62423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
62523b3eb3cSopenharmony_ci
62623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
62723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
62823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
62923b3eb3cSopenharmony_ci
63023b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
63123b3eb3cSopenharmony_ci    animation = nullptr;
63223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
63323b3eb3cSopenharmony_ci    combine = nullptr;
63423b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
63523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
63623b3eb3cSopenharmony_ci    option = nullptr;
63723b3eb3cSopenharmony_ci}
63823b3eb3cSopenharmony_ci
63923b3eb3cSopenharmony_ci/**
64023b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest025
64123b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
64223b3eb3cSopenharmony_ci * @tc.type: FUNC
64323b3eb3cSopenharmony_ci */
64423b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest025, TestSize.Level1)
64523b3eb3cSopenharmony_ci{
64623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
64723b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
64823b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
64923b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
65023b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
65123b3eb3cSopenharmony_ci
65223b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
65323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
65423b3eb3cSopenharmony_ci    option = nullptr;
65523b3eb3cSopenharmony_ci}
65623b3eb3cSopenharmony_ci
65723b3eb3cSopenharmony_ci/**
65823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest026
65923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
66023b3eb3cSopenharmony_ci * @tc.type: FUNC
66123b3eb3cSopenharmony_ci */
66223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest026, TestSize.Level1)
66323b3eb3cSopenharmony_ci{
66423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
66523b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
66623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
66723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
66823b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
66923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
67023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
67123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
67223b3eb3cSopenharmony_ci
67323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
67423b3eb3cSopenharmony_ci    combine = nullptr;
67523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
67623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
67723b3eb3cSopenharmony_ci    option = nullptr;
67823b3eb3cSopenharmony_ci}
67923b3eb3cSopenharmony_ci
68023b3eb3cSopenharmony_ci/**
68123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest027
68223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
68323b3eb3cSopenharmony_ci * @tc.type: FUNC
68423b3eb3cSopenharmony_ci */
68523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest027, TestSize.Level1)
68623b3eb3cSopenharmony_ci{
68723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
68823b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
68923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
69023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
69123b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
69223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
69323b3eb3cSopenharmony_ci
69423b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
69523b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
69623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
69723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
69823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
69923b3eb3cSopenharmony_ci
70023b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
70123b3eb3cSopenharmony_ci    animation = nullptr;
70223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
70323b3eb3cSopenharmony_ci    combine = nullptr;
70423b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
70523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
70623b3eb3cSopenharmony_ci    option = nullptr;
70723b3eb3cSopenharmony_ci}
70823b3eb3cSopenharmony_ci
70923b3eb3cSopenharmony_ci/**
71023b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest028
71123b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
71223b3eb3cSopenharmony_ci * @tc.type: FUNC
71323b3eb3cSopenharmony_ci */
71423b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest028, TestSize.Level1)
71523b3eb3cSopenharmony_ci{
71623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
71723b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
71823b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
71923b3eb3cSopenharmony_ci
72023b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
72123b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
72223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
72323b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
72423b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
72523b3eb3cSopenharmony_ci
72623b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
72723b3eb3cSopenharmony_ci    animation = nullptr;
72823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
72923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
73023b3eb3cSopenharmony_ci    option = nullptr;
73123b3eb3cSopenharmony_ci}
73223b3eb3cSopenharmony_ci
73323b3eb3cSopenharmony_ci/**
73423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest029
73523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
73623b3eb3cSopenharmony_ci * @tc.type: FUNC
73723b3eb3cSopenharmony_ci */
73823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest029, TestSize.Level1)
73923b3eb3cSopenharmony_ci{
74023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
74123b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
74223b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
74323b3eb3cSopenharmony_ci
74423b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
74523b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
74623b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
74723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
74823b3eb3cSopenharmony_ci
74923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
75023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
75123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
75223b3eb3cSopenharmony_ci
75323b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
75423b3eb3cSopenharmony_ci    animation = nullptr;
75523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
75623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
75723b3eb3cSopenharmony_ci    option = nullptr;
75823b3eb3cSopenharmony_ci}
75923b3eb3cSopenharmony_ci
76023b3eb3cSopenharmony_ci/**
76123b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest030
76223b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
76323b3eb3cSopenharmony_ci * @tc.type: FUNC
76423b3eb3cSopenharmony_ci */
76523b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest030, TestSize.Level1)
76623b3eb3cSopenharmony_ci{
76723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option =
76823b3eb3cSopenharmony_ci        OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge::ARKUI_TRANSITION_EDGE_START);
76923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
77023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
77123b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
77223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
77323b3eb3cSopenharmony_ci
77423b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
77523b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
77623b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
77723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
77823b3eb3cSopenharmony_ci
77923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
78023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
78123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
78223b3eb3cSopenharmony_ci
78323b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
78423b3eb3cSopenharmony_ci    animation = nullptr;
78523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
78623b3eb3cSopenharmony_ci    combine = nullptr;
78723b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
78823b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
78923b3eb3cSopenharmony_ci    option = nullptr;
79023b3eb3cSopenharmony_ci}
79123b3eb3cSopenharmony_ci
79223b3eb3cSopenharmony_ci/**
79323b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest031
79423b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
79523b3eb3cSopenharmony_ci * @tc.type: FUNC
79623b3eb3cSopenharmony_ci */
79723b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest031, TestSize.Level1)
79823b3eb3cSopenharmony_ci{
79923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
80023b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
80123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
80223b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
80323b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
80423b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
80523b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
80623b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
80723b3eb3cSopenharmony_ci
80823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
80923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
81023b3eb3cSopenharmony_ci    option = nullptr;
81123b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
81223b3eb3cSopenharmony_ci    appear = nullptr;
81323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
81423b3eb3cSopenharmony_ci    disappear = nullptr;
81523b3eb3cSopenharmony_ci}
81623b3eb3cSopenharmony_ci
81723b3eb3cSopenharmony_ci/**
81823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest032
81923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
82023b3eb3cSopenharmony_ci * @tc.type: FUNC
82123b3eb3cSopenharmony_ci */
82223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest032, TestSize.Level1)
82323b3eb3cSopenharmony_ci{
82423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
82523b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
82623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
82723b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
82823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
82923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
83023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
83123b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
83223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
83323b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
83423b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
83523b3eb3cSopenharmony_ci
83623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
83723b3eb3cSopenharmony_ci    combine = nullptr;
83823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
83923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
84023b3eb3cSopenharmony_ci    option = nullptr;
84123b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
84223b3eb3cSopenharmony_ci    appear = nullptr;
84323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
84423b3eb3cSopenharmony_ci    disappear = nullptr;
84523b3eb3cSopenharmony_ci}
84623b3eb3cSopenharmony_ci
84723b3eb3cSopenharmony_ci/**
84823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest033
84923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
85023b3eb3cSopenharmony_ci * @tc.type: FUNC
85123b3eb3cSopenharmony_ci */
85223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest033, TestSize.Level1)
85323b3eb3cSopenharmony_ci{
85423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
85523b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
85623b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
85723b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
85823b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
85923b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
86023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
86123b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
86223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
86323b3eb3cSopenharmony_ci
86423b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
86523b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
86623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
86723b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
86823b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
86923b3eb3cSopenharmony_ci
87023b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
87123b3eb3cSopenharmony_ci    animation = nullptr;
87223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
87323b3eb3cSopenharmony_ci    combine = nullptr;
87423b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
87523b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
87623b3eb3cSopenharmony_ci    option = nullptr;
87723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
87823b3eb3cSopenharmony_ci    appear = nullptr;
87923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
88023b3eb3cSopenharmony_ci    disappear = nullptr;
88123b3eb3cSopenharmony_ci}
88223b3eb3cSopenharmony_ci
88323b3eb3cSopenharmony_ci/**
88423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest034
88523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
88623b3eb3cSopenharmony_ci * @tc.type: FUNC
88723b3eb3cSopenharmony_ci */
88823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest034, TestSize.Level1)
88923b3eb3cSopenharmony_ci{
89023b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
89123b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
89223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
89323b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
89423b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
89523b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
89623b3eb3cSopenharmony_ci
89723b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
89823b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
89923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
90023b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
90123b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
90223b3eb3cSopenharmony_ci
90323b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
90423b3eb3cSopenharmony_ci    animation = nullptr;
90523b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
90623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
90723b3eb3cSopenharmony_ci    option = nullptr;
90823b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
90923b3eb3cSopenharmony_ci    appear = nullptr;
91023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
91123b3eb3cSopenharmony_ci    disappear = nullptr;
91223b3eb3cSopenharmony_ci}
91323b3eb3cSopenharmony_ci
91423b3eb3cSopenharmony_ci/**
91523b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest035
91623b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
91723b3eb3cSopenharmony_ci * @tc.type: FUNC
91823b3eb3cSopenharmony_ci */
91923b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest035, TestSize.Level1)
92023b3eb3cSopenharmony_ci{
92123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
92223b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
92323b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
92423b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
92523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
92623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
92723b3eb3cSopenharmony_ci
92823b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
92923b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
93023b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
93123b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
93223b3eb3cSopenharmony_ci
93323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
93423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
93523b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
93623b3eb3cSopenharmony_ci
93723b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
93823b3eb3cSopenharmony_ci    animation = nullptr;
93923b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
94023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
94123b3eb3cSopenharmony_ci    option = nullptr;
94223b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
94323b3eb3cSopenharmony_ci    appear = nullptr;
94423b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
94523b3eb3cSopenharmony_ci    disappear = nullptr;
94623b3eb3cSopenharmony_ci}
94723b3eb3cSopenharmony_ci
94823b3eb3cSopenharmony_ci/**
94923b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest036
95023b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
95123b3eb3cSopenharmony_ci * @tc.type: FUNC
95223b3eb3cSopenharmony_ci */
95323b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest036, TestSize.Level1)
95423b3eb3cSopenharmony_ci{
95523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
95623b3eb3cSopenharmony_ci    ASSERT_NE(appear, nullptr);
95723b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* disappear = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
95823b3eb3cSopenharmony_ci    ASSERT_NE(disappear, nullptr);
95923b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateAsymmetricTransitionEffect(appear, disappear);
96023b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
96123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* combine = OH_ArkUI_CreateOpacityTransitionEffect(0.0f);
96223b3eb3cSopenharmony_ci    ASSERT_NE(combine, nullptr);
96323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Combine(option, combine);
96423b3eb3cSopenharmony_ci
96523b3eb3cSopenharmony_ci    ArkUI_AnimateOption* animation = OH_ArkUI_AnimateOption_Create();
96623b3eb3cSopenharmony_ci    ASSERT_NE(animation, nullptr);
96723b3eb3cSopenharmony_ci    ArkUI_ExpectedFrameRateRange expectedFrameRateRange = {0, 0, 0};
96823b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(animation, &expectedFrameRateRange);
96923b3eb3cSopenharmony_ci
97023b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_SetAnimation(option, animation);
97123b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
97223b3eb3cSopenharmony_ci    ASSERT_NE(toEffectOption, nullptr);
97323b3eb3cSopenharmony_ci
97423b3eb3cSopenharmony_ci    OH_ArkUI_AnimateOption_Dispose(animation);
97523b3eb3cSopenharmony_ci    animation = nullptr;
97623b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(combine);
97723b3eb3cSopenharmony_ci    combine = nullptr;
97823b3eb3cSopenharmony_ci    option->toEffectOption = toEffectOption;
97923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
98023b3eb3cSopenharmony_ci    option = nullptr;
98123b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(appear);
98223b3eb3cSopenharmony_ci    appear = nullptr;
98323b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(disappear);
98423b3eb3cSopenharmony_ci    disappear = nullptr;
98523b3eb3cSopenharmony_ci}
98623b3eb3cSopenharmony_ci
98723b3eb3cSopenharmony_ci/**
98823b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest037
98923b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
99023b3eb3cSopenharmony_ci * @tc.type: FUNC
99123b3eb3cSopenharmony_ci */
99223b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest037, TestSize.Level1)
99323b3eb3cSopenharmony_ci{
99423b3eb3cSopenharmony_ci    ArkUI_TranslationOptions translationOptions = {0.0f, 0.0f, 0.0f};
99523b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateTranslationTransitionEffect(&translationOptions);
99623b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
99723b3eb3cSopenharmony_ci    option->translate = nullptr;
99823b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
99923b3eb3cSopenharmony_ci    ASSERT_EQ(toEffectOption, nullptr);
100023b3eb3cSopenharmony_ci
100123b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
100223b3eb3cSopenharmony_ci    option = nullptr;
100323b3eb3cSopenharmony_ci}
100423b3eb3cSopenharmony_ci
100523b3eb3cSopenharmony_ci/**
100623b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest038
100723b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
100823b3eb3cSopenharmony_ci * @tc.type: FUNC
100923b3eb3cSopenharmony_ci */
101023b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest038, TestSize.Level1)
101123b3eb3cSopenharmony_ci{
101223b3eb3cSopenharmony_ci    ArkUI_ScaleOptions scaleOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
101323b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateScaleTransitionEffect(&scaleOptions);
101423b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
101523b3eb3cSopenharmony_ci    option->scale = nullptr;
101623b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
101723b3eb3cSopenharmony_ci    ASSERT_EQ(toEffectOption, nullptr);
101823b3eb3cSopenharmony_ci
101923b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
102023b3eb3cSopenharmony_ci    option = nullptr;
102123b3eb3cSopenharmony_ci}
102223b3eb3cSopenharmony_ci
102323b3eb3cSopenharmony_ci/**
102423b3eb3cSopenharmony_ci * @tc.name: NodeTransitionTest039
102523b3eb3cSopenharmony_ci * @tc.desc: Test ConvertToEffectOption function.
102623b3eb3cSopenharmony_ci * @tc.type: FUNC
102723b3eb3cSopenharmony_ci */
102823b3eb3cSopenharmony_ciHWTEST_F(NodeTransitionTest, NodeTransitionTest039, TestSize.Level1)
102923b3eb3cSopenharmony_ci{
103023b3eb3cSopenharmony_ci    ArkUI_RotationOptions rotationOptions = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
103123b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* option = OH_ArkUI_CreateRotationTransitionEffect(&rotationOptions);
103223b3eb3cSopenharmony_ci    ASSERT_NE(option, nullptr);
103323b3eb3cSopenharmony_ci    option->rotate = nullptr;
103423b3eb3cSopenharmony_ci    ArkUITransitionEffectOption* toEffectOption = OHOS::Ace::TransitionModel::ConvertToEffectOption(option);
103523b3eb3cSopenharmony_ci    ASSERT_EQ(toEffectOption, nullptr);
103623b3eb3cSopenharmony_ci
103723b3eb3cSopenharmony_ci    OH_ArkUI_TransitionEffect_Dispose(option);
103823b3eb3cSopenharmony_ci    option = nullptr;
103923b3eb3cSopenharmony_ci}