3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #include "unit_test_common.h"
19 #include "suites/unit_test_sample_suite.h"
21 START_TEST(sample_test1)
23 fail_unless(2 != 1, "2 != 1 failed");
24 fail_unless(3 != 1, "3 != 1 failed");
27 END_TEST START_TEST(sample_test2)
30 fail_unless(10 != 5, "10 != 5 failed");
33 END_TEST Suite *sample_suite(void)
35 /* create test suite */
36 Suite *s = suite_create("Sample");
38 /* test case create and add in suite */
40 TCase *tcase = tcase_create("SampleTestCase");
41 /* TODO : explain following lines */
42 /* tcase_add_unchecked_fixture (tcase, setup, teardown); */
43 /* tcase_add_checked_fixture (tcase, setup, teardown); */
45 tcase_add_test(tcase, sample_test1);
46 tcase_add_test(tcase, sample_test2);
47 /* TODO : explain following lines */
48 tcase_set_timeout(tcase, 1);
50 suite_add_tcase(s, tcase);
53 /* create another test case and add to test suite just like above code */
55 TCase *tc_core2 = tcase_create("Sample2");
56 tcase_add_test(tc_core2, sample_test1);
57 tcase_add_test(tc_core2, sample_test2);
58 tcase_set_timeout(tc_core2, 1);
59 suite_add_tcase(s, tc_core2);