2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <dali-test-suite-utils.h>
19 #include <dali/dali.h>
20 #include <dali/public-api/adaptor-framework/widget-application.h>
21 #include <dali/public-api/adaptor-framework/widget.h>
25 void utc_dali_widget_application_startup(void)
27 test_return_value = TET_UNDEF;
30 void utc_dali_widget_application_cleanup(void)
32 test_return_value = TET_PASS;
37 Widget CreateWidgetFunction(const std::string&)
39 return Dali::Widget();
43 int UtcDaliWidgetApplicationRegisterWidgetCreatingFunctionNegative(void)
45 Dali::WidgetApplication instance;
49 instance.RegisterWidgetCreatingFunction(arg1, &CreateWidgetFunction);
50 DALI_TEST_CHECK(false); // Should not get here
54 DALI_TEST_CHECK(true); // We expect an assert
59 int UtcDaliWidgetApplicationConstructorsPositive(void)
61 WidgetApplication widget1;
64 WidgetApplication widget2 = WidgetApplication(widget1);
70 WidgetApplication widget3 = WidgetApplication(std::move(widget1));
73 widget2 = std::move(widget3);
75 DALI_TEST_CHECK(!widget1);
76 DALI_TEST_CHECK(!widget2);
77 DALI_TEST_CHECK(!widget3);