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/dali.h>
24 #include <dali-test-suite-utils.h>
28 static void Startup();
29 static void Cleanup();
32 void (*tet_startup)() = Startup;
33 void (*tet_cleanup)() = Cleanup;
37 POSITIVE_TC_IDX = 0x01,
41 #define MAX_NUMBER_OF_TESTS 10000
43 struct tet_testlist tet_testlist[MAX_NUMBER_OF_TESTS];
46 TEST_FUNCTION( Utc@MODULE@@CLASS@Method01, POSITIVE_TC_IDX );
47 TEST_FUNCTION( Utc@MODULE@@CLASS@Method02, NEGATIVE_TC_IDX );
49 // Called only once before first test is run.
54 // Called only once after last test is run
60 // Positive test case for a method
61 static void Utc@MODULE@@CLASS@Method01()
63 TestApplication application;
65 tet_infoline("Journaled printf Output");
73 // Negative test case for a method
74 static void Utc@MODULE@@CLASS@Method02()
76 TestApplication application; // Exceptions require TestApplication
80 /* My test code and results */
81 DALI_TEST_EQUALS(myVar, expectedValue, TEST_LOCATION);
83 catch (Dali::DaliException& e)
85 // Tests that a negative test of an assertion succeeds
86 tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
87 DALI_TEST_ASSERT(e, "assert conditional", TEST_LOCATION);