upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / test / src / suites / unit_test_sample_suite.c
1 /*
2  * oma-ds-service
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
5  * PROPRIETARY/CONFIDENTIAL
6  *
7  * Contact: JuHak Park <juhaki.park@samsung.com>,
8  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
9  *          SunBong Ha <sunbong.ha@samsung.com>
10  *
11  * This software is the confidential and proprietary information of
12  * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not disclose
13  * such Confidential Information and shall use it only in accordance with the
14  * terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
15  * SAMSUNG make no representations or warranties about the suitability of the
16  * software, either express or implied, including but not limited to the
17  * implied warranties of merchantability, fitness for a particular purpose, or
18  * non-infringement. SAMSUNG shall not be liable for any damages suffered by
19  * licensee as a result of using, modifying or distributing this software or
20  * its derivatives.
21  */
22
23 /*
24  * For any sort of issue you concern as to this software,
25  * you may use following point of contact.
26  * All resources contributed on this software
27  * are orinigally written by S-Core Inc., a member of Samsung Group.
28  *
29  * SeongWon Shim <seongwon.shim@samsung.com>
30  */
31
32 /*
33  * unit_test_sample_suite.c
34  *
35  *  Created on: 2011. 3. 29.
36  *      Author: yangjoo.suh
37  */
38
39 #include "unit_test_common.h"
40 #include "suites/unit_test_sample_suite.h"
41
42 START_TEST(sample_test1)
43 {
44         fail_unless(2 != 1, "2 != 1 failed");
45         fail_unless(3 != 1, "3 != 1 failed");
46 }
47 END_TEST
48
49 START_TEST(sample_test2)
50 {
51   /* unit test code */
52         fail_unless(10 != 5, "10 != 5 failed");
53 }
54 END_TEST
55
56 Suite *sample_suite(void)
57 {
58         /* create test suite */
59         Suite *s = suite_create("Sample");
60
61         /* test case create and add in suite*/
62         {
63                 TCase *tcase = tcase_create("SampleTestCase");
64                 /* TODO : explain following lines */
65         /*  tcase_add_unchecked_fixture (tcase, setup, teardown);*/
66         /*  tcase_add_checked_fixture (tcase, setup, teardown);*/
67
68                 tcase_add_test(tcase, sample_test1);
69                 tcase_add_test(tcase, sample_test2);
70                 /* TODO : explain following lines */
71                 tcase_set_timeout(tcase, 1);
72
73                 suite_add_tcase(s, tcase);
74         }
75
76         /* create another test case and add to test suite just like above code */
77         {
78                 TCase *tc_core2 = tcase_create("Sample2");
79                 tcase_add_test(tc_core2, sample_test1);
80                 tcase_add_test(tc_core2, sample_test2);
81                 tcase_set_timeout(tc_core2, 1);
82                 suite_add_tcase(s, tc_core2);
83         }
84
85         return s;
86 }