2 * Copyright (c) 2023 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-toolkit-test-suite-utils.h>
19 #include <dali-toolkit/dali-toolkit.h>
23 #include <dali-scene3d/internal/model-components/model-primitive-impl.h>
26 using namespace Dali::Toolkit;
28 void model_components_model_primitive_impl_startup(void)
30 test_return_value = TET_UNDEF;
33 void model_components_model_primitive_impl_cleanup(void)
35 test_return_value = TET_PASS;
43 int UtcDaliModelPrimitiveImplSetData(void)
45 ToolkitTestApplication application;
47 Scene3D::ModelPrimitive modelPrimitive = Scene3D::ModelPrimitive::New();
49 tet_printf("Check primitive don't have material initial time\n");
51 DALI_TEST_CHECK(!GetImplementation(modelPrimitive).GetRenderer());
52 DALI_TEST_CHECK(!modelPrimitive.GetGeometry());
53 DALI_TEST_CHECK(!modelPrimitive.GetMaterial());
55 Dali::Geometry geometry = Dali::Geometry::New();
56 Dali::Scene3D::Material material = Dali::Scene3D::Material::New();
58 modelPrimitive.SetGeometry(geometry);
59 modelPrimitive.SetMaterial(material);
60 DALI_TEST_CHECK(geometry == modelPrimitive.GetGeometry());
61 DALI_TEST_CHECK(material == modelPrimitive.GetMaterial());
62 DALI_TEST_CHECK(GetImplementation(modelPrimitive).GetRenderer());