1 : /*
2 : * This file is part of MIN Test Framework. Copyright © 2008 Nokia Corporation
3 : * and/or its subsidiary(-ies).
4 : * Contact: Konrad Marek Zapalowicz
5 : * Contact e-mail: DG.MIN-Support@nokia.com
6 : *
7 : * This program is free software: you can redistribute it and/or modify it
8 : * under the terms of the GNU General Public License as published by the Free
9 : * Software Foundation, version 2 of the License.
10 : *
11 : * This program is distributed in the hope that it will be useful, but WITHOUT
12 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 : * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 : * more details. You should have received a copy of the GNU General Public
15 : * License along with this program. If not, see
16 : * <http://www.gnu.org/licenses/>.
17 : */
18 :
19 :
20 : /**
21 : * @file check_logger.c
22 : * @version 0.1
23 : * @brief This file contains implementation of tests for Logger Mechanism
24 : */
25 :
26 : /* ------------------------------------------------------------------------- */
27 :
28 : #include <stdlib.h>
29 : #include <check.h>
30 : #include "min_logger.h"
31 : #include "check_logger.tests"
32 :
33 : /* ------------------------------------------------------------------------- */
34 : /* EXTERNAL DATA STRUCTURES */
35 : /* None */
36 :
37 : /* ------------------------------------------------------------------------- */
38 : /* EXTERNAL GLOBAL VARIABLES */
39 : /* None */
40 :
41 : /* ------------------------------------------------------------------------- */
42 : /* EXTERNAL FUNCTION PROTOTYPES */
43 : extern int min_logger_file_output_tests ();
44 : extern int min_logger_tests ();
45 :
46 : /* ------------------------------------------------------------------------- */
47 : /* GLOBAL VARIABLES */
48 : /* None */
49 :
50 : /* ------------------------------------------------------------------------- */
51 : /* CONSTANTS */
52 : /* None */
53 :
54 : /* ------------------------------------------------------------------------- */
55 : /* MACROS */
56 : /* None */
57 :
58 : /* ------------------------------------------------------------------------- */
59 : /* LOCAL GLOBAL VARIABLES */
60 : /* None */
61 :
62 : /* ------------------------------------------------------------------------- */
63 : /* LOCAL CONSTANTS AND MACROS */
64 : /* None */
65 :
66 : /* ------------------------------------------------------------------------- */
67 : /* MODULE DATA STRUCTURES */
68 : /* None */
69 :
70 : /* ------------------------------------------------------------------------- */
71 : /* LOCAL FUNCTION PROTOTYPES */
72 : /* None */
73 :
74 : /* ------------------------------------------------------------------------- */
75 : /* FORWARD DECLARATIONS */
76 : /* None */
77 :
78 : /* ==================== LOCAL FUNCTIONS ==================================== */
79 :
80 : int main (int argc, char *argv[])
81 124 : {
82 124 : int number_failed = 0;
83 124 : Suite *s = logger_suite ();
84 124 : SRunner *sr = srunner_create (s);
85 :
86 124 : srunner_run_all (sr, CK_NORMAL);
87 116 : number_failed += srunner_ntests_failed (sr);
88 116 : srunner_free (sr);
89 :
90 116 : s = min_logger_file_output_suite ();
91 116 : sr = srunner_create (s);
92 :
93 116 : srunner_run_all (sr, CK_NORMAL);
94 25 : number_failed += srunner_ntests_failed (sr);
95 25 : srunner_free (sr);
96 :
97 25 : s = min_logger_suite ();
98 25 : sr = srunner_create (s);
99 25 : srunner_run_all (sr, CK_NORMAL);
100 1 : number_failed += srunner_ntests_failed (sr);
101 1 : srunner_free (sr);
102 :
103 1 : return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
104 : }
105 :
106 :
107 :
108 : /* ================= OTHER EXPORTED FUNCTIONS ============================== */
109 : /* None */
110 :
111 : /* End of file */
|