2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
22 #include <dali/public-api/dali-core.h>
23 #include <dali-toolkit/dali-toolkit.h>
25 #include <dali-toolkit-test-suite-utils.h>
28 using namespace Dali::Toolkit;
30 static void Startup();
31 static void Cleanup();
34 void (*tet_startup)() = Startup;
35 void (*tet_cleanup)() = Cleanup;
38 static void Utc@MODULE@@CLASS@Method01();
39 static void Utc@MODULE@@CLASS@Method02();
42 POSITIVE_TC_IDX = 0x01,
46 // Add test functionality for all APIs in the class (Positive and Negative)
48 struct tet_testlist tet_testlist[] = {
49 { Utc@MODULE@@CLASS@Method01, POSITIVE_TC_IDX },
50 { Utc@MODULE@@CLASS@Method02, NEGATIVE_TC_IDX },
55 // Called only once before first test is run.
60 // Called only once after last test is run
66 // Positive test case for a method
67 static void Utc@MODULE@@CLASS@Method01()
69 ToolkitTestApplication application;
71 tet_infoline("Journaled printf Output");
79 // Negative test case for a method
80 static void Utc@MODULE@@CLASS@Method02()
82 ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
86 /* My test code and results */
87 DALI_TEST_EQUALS(myVar, expectedValue, TEST_LOCATION);
89 catch (Dali::DaliException& e)
91 // Tests that a negative test of an assertion succeeds
92 tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
93 DALI_TEST_EQUALS(e.mCondition, "assert conditional", TEST_LOCATION);