2 * Copyright (c) 2014 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.
23 #include <dali/public-api/dali-core.h>
24 #include <dali-toolkit/dali-toolkit.h>
26 #include <dali-toolkit-test-suite-utils.h>
29 using namespace Dali::Toolkit;
31 static void Startup();
32 static void Cleanup();
35 void (*tet_startup)() = Startup;
36 void (*tet_cleanup)() = Cleanup;
39 static void Utc@MODULE@@CLASS@Method01();
40 static void Utc@MODULE@@CLASS@Method02();
43 POSITIVE_TC_IDX = 0x01,
47 // Add test functionality for all APIs in the class (Positive and Negative)
49 struct tet_testlist tet_testlist[] = {
50 { Utc@MODULE@@CLASS@Method01, POSITIVE_TC_IDX },
51 { Utc@MODULE@@CLASS@Method02, NEGATIVE_TC_IDX },
56 // Called only once before first test is run.
61 // Called only once after last test is run
67 // Positive test case for a method
68 static void Utc@MODULE@@CLASS@Method01()
70 ToolkitTestApplication application;
72 tet_infoline("Journaled printf Output");
80 // Negative test case for a method
81 static void Utc@MODULE@@CLASS@Method02()
83 ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
87 /* My test code and results */
88 DALI_TEST_EQUALS(myVar, expectedValue, TEST_LOCATION);
90 catch (Dali::DaliException& e)
92 // Tests that a negative test of an assertion succeeds
93 tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
94 DALI_TEST_EQUALS(e.mCondition, "assert conditional", TEST_LOCATION);