annotate packages/infra/current/include/testcase.h @ 3292:7f8e529b4d82 default tip

Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF() so it works with negative offsets.
author vae
date Wed, 29 Apr 2015 23:31:48 +0000
parents 74dbf4c3f2e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #ifndef CYGONCE_INFRA_TESTCASE_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #define CYGONCE_INFRA_TESTCASE_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
3 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
4 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
5 // testcase.h
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
6 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
7 // Target side interface for tests
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
8 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
9 //==========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
10 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
11 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
12 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
13 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 66
diff changeset
14 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
15 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
16 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
17 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
18 // version.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 66
diff changeset
19 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
20 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
21 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
22 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
23 // for more details.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 66
diff changeset
24 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
25 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
26 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
27 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 66
diff changeset
28 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
29 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
30 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
31 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
32 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
33 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
34 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
35 // General Public License v2.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 66
diff changeset
36 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
37 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
38 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
39 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 210
diff changeset
40 // ####ECOSGPLCOPYRIGHTEND####
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
41 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
42 //#####DESCRIPTIONBEGIN####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
43 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
44 // Author(s): ctarpy
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
45 // Contributors: ctarpy, jlarmour
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
46 // Date: 1999-02-16
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
47 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
48 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
49 //####DESCRIPTIONEND####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
50
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
51 #include <cyg/infra/cyg_type.h> // Common type definitions and support
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
52
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
53
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
54 // CONSTANTS
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
55
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
56 // Status codes
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
57
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
58 typedef enum {
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
59 CYGNUM_TEST_FAIL,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
60 CYGNUM_TEST_PASS,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
61 CYGNUM_TEST_EXIT,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
62 CYGNUM_TEST_INFO,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
63 CYGNUM_TEST_GDBCMD,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
64 CYGNUM_TEST_NA
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
65 } Cyg_test_code;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
66
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
67 // FUNCTION PROTOTYPES
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
68
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
69 externC void
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
70 cyg_test_output(Cyg_test_code _status_, const char* _msg_, int _line_number_,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
71 const char* _file_);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
72
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
73 // This should be called at the start of each test file
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
74 externC void
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
75 cyg_test_init(void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
76
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
77 // This causes the test to exit
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
78 externC void
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
79 cyg_test_exit(void) CYGBLD_ATTRIB_NORET;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
80
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
81 // GLOBALS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
82
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
83 externC int cyg_test_is_simulator; // infrastructure changes as necessary
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
84
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
85 // MACROS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
86
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
87 // ----------- Info -----------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
88 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
89 // Any macro with EXIT in it should only be used in a panic situation. It
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
90 // is synonymous with assert. If the test behaves as expected, it
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
91 // should call one of the FINISH macros.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
92 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
93 // - Compound testcases
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
94 // If a testcase is capable of being part of a compound, then the following
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
95 // rules apply:
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
96 // - The testcase must only ever call one of the EXIT macros if it decides
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
97 // the state of the system is such that further testing is meaningless;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
98 // such a call would prevent subsequent tests in the compound from being
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
99 // run.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
100 // - In order to terminate the test, the testcase should call one of the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
101 // FINISH macros. This must be done from within main().
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
102
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
103
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
104
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
105
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
106 // The following is the testcase API to be used by testcases.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
107
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
108 #define CYG_TEST_INIT() cyg_test_init()
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
109
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
110 #define CYG_TEST_INFO( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
111 cyg_test_output(CYGNUM_TEST_INFO, _msg_, __LINE__, __FILE__)
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
112
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
113 #define CYG_TEST_PASS( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
114 cyg_test_output(CYGNUM_TEST_PASS, _msg_, __LINE__, __FILE__)
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
115
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
116 #define CYG_TEST_FAIL( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
117 cyg_test_output(CYGNUM_TEST_FAIL, _msg_, __LINE__, __FILE__)
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
118
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
119 #define CYG_TEST_EXIT( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
120 (cyg_test_output(CYGNUM_TEST_EXIT, _msg_, __LINE__, __FILE__), \
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121 cyg_test_exit())
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
122
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
123 // Use the following macro to instruct GDB to run a command when using
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
124 // the automatic testing infrastructure. This must be used *before*
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
125 // CYG_TEST_INIT() is called
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
126
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
127 #define CYG_TEST_GDBCMD( _command_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
128 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
129 cyg_test_output(CYGNUM_TEST_GDBCMD, _command_, __LINE__, __FILE__); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
130 CYG_MACRO_END
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
131
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
132 // Use the following macro to declare that a test is not applicable for
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
133 // some reason - perhaps not appropriate due to chosen hardware,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
134 // configuration options governing the presence of a tested feature, or
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
135 // even configuration options governing the presence of a feature the
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
136 // test relies on _in_order_ to test the feature (despite being
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
137 // unrelated!)
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
138
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
139 #define CYG_TEST_NA( _msg_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
140 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
141 cyg_test_output(CYGNUM_TEST_NA, _msg_, __LINE__, __FILE__); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
142 cyg_test_exit(); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
143 CYG_MACRO_END
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
144
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
145 #ifdef CYG_COMPOUND_TEST
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
146 # define CYG_TEST_FINISH( _msg_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
147 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
148 cyg_test_output(CYGNUM_TEST_EXIT, _msg_, __LINE__, __FILE__); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
149 return 0; \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
150 CYG_MACRO_END
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
151 #else
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
152 # define CYG_TEST_FINISH( _msg_ ) CYG_TEST_EXIT( _msg_ )
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
153 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
154
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
155 #define CYG_TEST_STILL_ALIVE( _ctr_ , _msg_ ) CYG_TEST_INFO( _msg_ )
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
156
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
157
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
158 // ----- The following are convenience functions
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
159
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
160 #define CYG_TEST_PASS_FINISH( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
161 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
162 CYG_TEST_PASS( _msg_ ); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
163 CYG_TEST_FINISH("done"); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
164 CYG_MACRO_END
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
165
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
166 #define CYG_TEST_FAIL_FINISH( _msg_ ) \
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
167 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
168 CYG_TEST_FAIL( _msg_ ); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
169 CYG_TEST_FINISH("done"); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
170 CYG_MACRO_END
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
171
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
172
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
173 #define CYG_TEST_CHECK( _chk_ , _msg_) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
174 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
175 (void)(( _chk_ ) || ( CYG_TEST_FAIL( _msg_ ) , cyg_test_exit(), 1)); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
176 CYG_MACRO_END
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
177
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
178 #define CYG_TEST_PASS_FAIL( _cdn_, _msg_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
179 CYG_MACRO_START \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
180 if ( _cdn_ ) CYG_TEST_PASS( _msg_ ); else CYG_TEST_FAIL( _msg_ ); \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
181 CYG_MACRO_END
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
182
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
183
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
184 // CYG_TEST_PASS_EXIT and CYG_TEST_FAIL_EXIT are now obscelete,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
185 // but are here for now
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
186 // to avoid breaking testcases which still use them. They will
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
187 // soon go away.
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
188 #define CYG_TEST_PASS_EXIT( _msg_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
189 (cyg_test_output(CYGNUM_TEST_PASS, _msg_, __LINE__, __FILE__), \
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
190 CYG_TEST_EXIT("done"))
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
191
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
192 #define CYG_TEST_FAIL_EXIT( _msg_ ) \
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
193 (cyg_test_output(CYGNUM_TEST_FAIL, _msg_, __LINE__, __FILE__), \
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
194 CYG_TEST_EXIT("done"))
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
195
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
196
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
197 #endif // CYGONCE_INFRA_TESTCASE_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
198 // EOF testcase.h