Nicolas Borla / Mbed OS ROME2_Robot_Firmware
Committer:
boro
Date:
Mon Mar 16 13:12:31 2020 +0000
Revision:
0:4beb2ea291ec
a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
boro 0:4beb2ea291ec 1 /* mbed Microcontroller Library
boro 0:4beb2ea291ec 2 * Copyright (c) 2017 ARM Limited
boro 0:4beb2ea291ec 3 *
boro 0:4beb2ea291ec 4 * Licensed under the Apache License, Version 2.0 (the "License");
boro 0:4beb2ea291ec 5 * you may not use this file except in compliance with the License.
boro 0:4beb2ea291ec 6 * You may obtain a copy of the License at
boro 0:4beb2ea291ec 7 *
boro 0:4beb2ea291ec 8 * http://www.apache.org/licenses/LICENSE-2.0
boro 0:4beb2ea291ec 9 *
boro 0:4beb2ea291ec 10 * Unless required by applicable law or agreed to in writing, software
boro 0:4beb2ea291ec 11 * distributed under the License is distributed on an "AS IS" BASIS,
boro 0:4beb2ea291ec 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
boro 0:4beb2ea291ec 13 * See the License for the specific language governing permissions and
boro 0:4beb2ea291ec 14 * limitations under the License.
boro 0:4beb2ea291ec 15 */
boro 0:4beb2ea291ec 16 #include "mbed.h"
boro 0:4beb2ea291ec 17 #include "greentea-client/test_env.h"
boro 0:4beb2ea291ec 18 #include "unity.h"
boro 0:4beb2ea291ec 19 #include "utest.h"
boro 0:4beb2ea291ec 20 #include "rtos.h"
boro 0:4beb2ea291ec 21
boro 0:4beb2ea291ec 22 #if defined(MBED_RTOS_SINGLE_THREAD)
boro 0:4beb2ea291ec 23 #error [NOT_SUPPORTED] test not supported
boro 0:4beb2ea291ec 24 #endif
boro 0:4beb2ea291ec 25
boro 0:4beb2ea291ec 26 using namespace utest::v1;
boro 0:4beb2ea291ec 27
boro 0:4beb2ea291ec 28 #define THREAD_STACK_SIZE 512
boro 0:4beb2ea291ec 29 #define TEST_UINT_MSG 0xDEADBEEF
boro 0:4beb2ea291ec 30 #define TEST_UINT_MSG2 0xE1EE7
boro 0:4beb2ea291ec 31 #define TEST_TIMEOUT 50
boro 0:4beb2ea291ec 32
boro 0:4beb2ea291ec 33 template <uint32_t ms>
boro 0:4beb2ea291ec 34 void thread_put_uint_msg(Queue<uint32_t, 1> *q)
boro 0:4beb2ea291ec 35 {
boro 0:4beb2ea291ec 36 Thread::wait(ms);
boro 0:4beb2ea291ec 37 osStatus stat = q->put((uint32_t*) TEST_UINT_MSG);
boro 0:4beb2ea291ec 38 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 39 }
boro 0:4beb2ea291ec 40
boro 0:4beb2ea291ec 41 template <uint32_t ms, uint32_t val>
boro 0:4beb2ea291ec 42 void thread_get_uint_msg(Queue<uint32_t, 1> *q)
boro 0:4beb2ea291ec 43 {
boro 0:4beb2ea291ec 44 Thread::wait(ms);
boro 0:4beb2ea291ec 45 osEvent evt = q->get();
boro 0:4beb2ea291ec 46 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 47 TEST_ASSERT_EQUAL(val, evt.value.v);
boro 0:4beb2ea291ec 48 }
boro 0:4beb2ea291ec 49
boro 0:4beb2ea291ec 50 /** Test pass uint msg
boro 0:4beb2ea291ec 51
boro 0:4beb2ea291ec 52 Given a queue for uint32_t messages with one slot
boro 0:4beb2ea291ec 53 When a uin32_t value is inserted into the queue
boro 0:4beb2ea291ec 54 and a message is extracted from the queue
boro 0:4beb2ea291ec 55 Then the extracted message is the same as previously inserted message
boro 0:4beb2ea291ec 56 */
boro 0:4beb2ea291ec 57 void test_pass_uint()
boro 0:4beb2ea291ec 58 {
boro 0:4beb2ea291ec 59 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 60 osStatus stat = q.put((uint32_t*)TEST_UINT_MSG);
boro 0:4beb2ea291ec 61 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 62
boro 0:4beb2ea291ec 63 osEvent evt = q.get();
boro 0:4beb2ea291ec 64 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 65 TEST_ASSERT_EQUAL(TEST_UINT_MSG, evt.value.v);
boro 0:4beb2ea291ec 66 }
boro 0:4beb2ea291ec 67
boro 0:4beb2ea291ec 68 /** Test pass uint msg twice
boro 0:4beb2ea291ec 69
boro 0:4beb2ea291ec 70 Given a queue for uint32_t messages with one slot
boro 0:4beb2ea291ec 71 When a uin32_t value is inserted into the queue
boro 0:4beb2ea291ec 72 and a message is extracted from the queue
boro 0:4beb2ea291ec 73 and the procedure is repeated with different message
boro 0:4beb2ea291ec 74 Then the extracted message is the same as previously inserted message for both iterations
boro 0:4beb2ea291ec 75
boro 0:4beb2ea291ec 76 */
boro 0:4beb2ea291ec 77 void test_pass_uint_twice()
boro 0:4beb2ea291ec 78 {
boro 0:4beb2ea291ec 79 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 80 osStatus stat = q.put((uint32_t*)TEST_UINT_MSG);
boro 0:4beb2ea291ec 81 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 82
boro 0:4beb2ea291ec 83 osEvent evt = q.get();
boro 0:4beb2ea291ec 84 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 85 TEST_ASSERT_EQUAL(TEST_UINT_MSG, evt.value.v);
boro 0:4beb2ea291ec 86
boro 0:4beb2ea291ec 87 stat = q.put((uint32_t*)TEST_UINT_MSG2);
boro 0:4beb2ea291ec 88 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 89
boro 0:4beb2ea291ec 90 evt = q.get();
boro 0:4beb2ea291ec 91 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 92 TEST_ASSERT_EQUAL(TEST_UINT_MSG2, evt.value.v);
boro 0:4beb2ea291ec 93 }
boro 0:4beb2ea291ec 94
boro 0:4beb2ea291ec 95 /** Test pass ptr msg
boro 0:4beb2ea291ec 96
boro 0:4beb2ea291ec 97 Given a queue for pointers to uint32_t messages with one slot
boro 0:4beb2ea291ec 98 When a pointer to an uint32_t is inserted into the queue
boro 0:4beb2ea291ec 99 and a message is extracted from the queue
boro 0:4beb2ea291ec 100 Then the extracted message is the same as previously inserted message
boro 0:4beb2ea291ec 101 */
boro 0:4beb2ea291ec 102 void test_pass_ptr()
boro 0:4beb2ea291ec 103 {
boro 0:4beb2ea291ec 104 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 105 uint32_t msg = TEST_UINT_MSG;
boro 0:4beb2ea291ec 106
boro 0:4beb2ea291ec 107 osStatus stat = q.put(&msg);
boro 0:4beb2ea291ec 108 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 109
boro 0:4beb2ea291ec 110 osEvent evt = q.get();
boro 0:4beb2ea291ec 111 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 112 TEST_ASSERT_EQUAL(&msg, evt.value.p);
boro 0:4beb2ea291ec 113 }
boro 0:4beb2ea291ec 114
boro 0:4beb2ea291ec 115 /** Test get from empty queue
boro 0:4beb2ea291ec 116
boro 0:4beb2ea291ec 117 Given an empty queue for uint32_t values
boro 0:4beb2ea291ec 118 When @a get is called on the queue with timeout of 0
boro 0:4beb2ea291ec 119 Then queue returns status of osOK, but no data
boro 0:4beb2ea291ec 120 */
boro 0:4beb2ea291ec 121 void test_get_empty_no_timeout()
boro 0:4beb2ea291ec 122 {
boro 0:4beb2ea291ec 123 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 124
boro 0:4beb2ea291ec 125 osEvent evt = q.get(0);
boro 0:4beb2ea291ec 126 TEST_ASSERT_EQUAL(osOK, evt.status);
boro 0:4beb2ea291ec 127 }
boro 0:4beb2ea291ec 128
boro 0:4beb2ea291ec 129 /** Test get from empty queue with timeout
boro 0:4beb2ea291ec 130
boro 0:4beb2ea291ec 131 Given an empty queue for uint32_t values
boro 0:4beb2ea291ec 132 When @a get is called on the queue with timeout of 50ms
boro 0:4beb2ea291ec 133 Then queue returns status of osEventTimeout after about 50ms wait
boro 0:4beb2ea291ec 134 */
boro 0:4beb2ea291ec 135 void test_get_empty_timeout()
boro 0:4beb2ea291ec 136 {
boro 0:4beb2ea291ec 137 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 138 Timer timer;
boro 0:4beb2ea291ec 139 timer.start();
boro 0:4beb2ea291ec 140
boro 0:4beb2ea291ec 141 osEvent evt = q.get(50);
boro 0:4beb2ea291ec 142 TEST_ASSERT_EQUAL(osEventTimeout, evt.status);
boro 0:4beb2ea291ec 143 TEST_ASSERT_UINT32_WITHIN(5000, 50000, timer.read_us());
boro 0:4beb2ea291ec 144 }
boro 0:4beb2ea291ec 145
boro 0:4beb2ea291ec 146 /** Test get empty wait forever
boro 0:4beb2ea291ec 147
boro 0:4beb2ea291ec 148 Given a two threads A & B and a queue for uint32_t values
boro 0:4beb2ea291ec 149 When thread A calls @a get on an empty queue with osWaitForever
boro 0:4beb2ea291ec 150 Then the thread A waits for a message to appear in the queue
boro 0:4beb2ea291ec 151 When thread B puts a message in the queue
boro 0:4beb2ea291ec 152 Then thread A wakes up and receives it
boro 0:4beb2ea291ec 153 */
boro 0:4beb2ea291ec 154 void test_get_empty_wait_forever()
boro 0:4beb2ea291ec 155 {
boro 0:4beb2ea291ec 156 Thread t(osPriorityNormal, THREAD_STACK_SIZE);
boro 0:4beb2ea291ec 157 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 158
boro 0:4beb2ea291ec 159 t.start(callback(thread_put_uint_msg<TEST_TIMEOUT>, &q));
boro 0:4beb2ea291ec 160
boro 0:4beb2ea291ec 161 Timer timer;
boro 0:4beb2ea291ec 162 timer.start();
boro 0:4beb2ea291ec 163
boro 0:4beb2ea291ec 164 osEvent evt = q.get();
boro 0:4beb2ea291ec 165 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 166 TEST_ASSERT_EQUAL(TEST_UINT_MSG, evt.value.v);
boro 0:4beb2ea291ec 167 TEST_ASSERT_UINT32_WITHIN(TEST_TIMEOUT * 100, TEST_TIMEOUT * 1000, timer.read_us());
boro 0:4beb2ea291ec 168 }
boro 0:4beb2ea291ec 169
boro 0:4beb2ea291ec 170 /** Test put full no timeout
boro 0:4beb2ea291ec 171 *
boro 0:4beb2ea291ec 172 * Given a queue with one slot for uint32_t data
boro 0:4beb2ea291ec 173 * When a thread tries to insert two messages
boro 0:4beb2ea291ec 174 * Then first operation succeeds and second fails with @a osErrorResource
boro 0:4beb2ea291ec 175 */
boro 0:4beb2ea291ec 176 void test_put_full_no_timeout()
boro 0:4beb2ea291ec 177 {
boro 0:4beb2ea291ec 178 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 179
boro 0:4beb2ea291ec 180 osStatus stat = q.put((uint32_t*) TEST_UINT_MSG);
boro 0:4beb2ea291ec 181 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 182
boro 0:4beb2ea291ec 183 stat = q.put((uint32_t*) TEST_UINT_MSG);
boro 0:4beb2ea291ec 184 TEST_ASSERT_EQUAL(osErrorResource, stat);
boro 0:4beb2ea291ec 185 }
boro 0:4beb2ea291ec 186
boro 0:4beb2ea291ec 187 /** Test put full timeout
boro 0:4beb2ea291ec 188 *
boro 0:4beb2ea291ec 189 * Given a queue with one slot for uint32_t data
boro 0:4beb2ea291ec 190 * When a thread tries to insert two messages with @ TEST_TIMEOUT timeout
boro 0:4beb2ea291ec 191 * Then first operation succeeds and second fails with @a osErrorTimeout
boro 0:4beb2ea291ec 192 */
boro 0:4beb2ea291ec 193 void test_put_full_timeout()
boro 0:4beb2ea291ec 194 {
boro 0:4beb2ea291ec 195 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 196
boro 0:4beb2ea291ec 197 osStatus stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT);
boro 0:4beb2ea291ec 198 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 199
boro 0:4beb2ea291ec 200 Timer timer;
boro 0:4beb2ea291ec 201 timer.start();
boro 0:4beb2ea291ec 202
boro 0:4beb2ea291ec 203 stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT);
boro 0:4beb2ea291ec 204 TEST_ASSERT_EQUAL(osErrorTimeout, stat);
boro 0:4beb2ea291ec 205 TEST_ASSERT_UINT32_WITHIN(TEST_TIMEOUT * 100, TEST_TIMEOUT * 1000, timer.read_us());
boro 0:4beb2ea291ec 206 }
boro 0:4beb2ea291ec 207
boro 0:4beb2ea291ec 208 /** Test put full wait forever
boro 0:4beb2ea291ec 209 *
boro 0:4beb2ea291ec 210 * Given two threads A & B and a queue with one slot for uint32_t data
boro 0:4beb2ea291ec 211 * When thread A puts a message to the queue and tries to put second one with @a osWaitForever timeout
boro 0:4beb2ea291ec 212 * Then thread waits for a slot to become empty in the queue
boro 0:4beb2ea291ec 213 * When thread B takes one message out of the queue
boro 0:4beb2ea291ec 214 * Then thread A successfully inserts message into the queue
boro 0:4beb2ea291ec 215 */
boro 0:4beb2ea291ec 216 void test_put_full_waitforever()
boro 0:4beb2ea291ec 217 {
boro 0:4beb2ea291ec 218 Thread t(osPriorityNormal, THREAD_STACK_SIZE);
boro 0:4beb2ea291ec 219 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 220
boro 0:4beb2ea291ec 221 t.start(callback(thread_get_uint_msg<TEST_TIMEOUT, TEST_UINT_MSG>, &q));
boro 0:4beb2ea291ec 222
boro 0:4beb2ea291ec 223 osStatus stat = q.put((uint32_t*) TEST_UINT_MSG);
boro 0:4beb2ea291ec 224 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 225
boro 0:4beb2ea291ec 226 Timer timer;
boro 0:4beb2ea291ec 227 timer.start();
boro 0:4beb2ea291ec 228 stat = q.put((uint32_t*) TEST_UINT_MSG, osWaitForever);
boro 0:4beb2ea291ec 229 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 230 TEST_ASSERT_UINT32_WITHIN(TEST_TIMEOUT * 100, TEST_TIMEOUT * 1000, timer.read_us());
boro 0:4beb2ea291ec 231
boro 0:4beb2ea291ec 232 t.join();
boro 0:4beb2ea291ec 233 }
boro 0:4beb2ea291ec 234
boro 0:4beb2ea291ec 235 /** Test message ordering
boro 0:4beb2ea291ec 236
boro 0:4beb2ea291ec 237 Given a queue of uint32_t data
boro 0:4beb2ea291ec 238 When two messages are inserted with equal priority
boro 0:4beb2ea291ec 239 Then messages should be returned in the exact order they were inserted
boro 0:4beb2ea291ec 240 */
boro 0:4beb2ea291ec 241 void test_msg_order()
boro 0:4beb2ea291ec 242 {
boro 0:4beb2ea291ec 243 Queue<uint32_t, 2> q;
boro 0:4beb2ea291ec 244
boro 0:4beb2ea291ec 245 osStatus stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT);
boro 0:4beb2ea291ec 246 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 247
boro 0:4beb2ea291ec 248 stat = q.put((uint32_t*) TEST_UINT_MSG2, TEST_TIMEOUT);
boro 0:4beb2ea291ec 249 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 250
boro 0:4beb2ea291ec 251 osEvent evt = q.get();
boro 0:4beb2ea291ec 252 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 253 TEST_ASSERT_EQUAL(TEST_UINT_MSG, evt.value.v);
boro 0:4beb2ea291ec 254
boro 0:4beb2ea291ec 255 evt = q.get();
boro 0:4beb2ea291ec 256 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 257 TEST_ASSERT_EQUAL(TEST_UINT_MSG2, evt.value.v);
boro 0:4beb2ea291ec 258 }
boro 0:4beb2ea291ec 259
boro 0:4beb2ea291ec 260 /** Test message priority
boro 0:4beb2ea291ec 261
boro 0:4beb2ea291ec 262 Given a queue of uint32_t data
boro 0:4beb2ea291ec 263 When two messages are inserted with ascending priority
boro 0:4beb2ea291ec 264 Then messages should be returned in descending priority order
boro 0:4beb2ea291ec 265 */
boro 0:4beb2ea291ec 266 void test_msg_prio()
boro 0:4beb2ea291ec 267 {
boro 0:4beb2ea291ec 268 Queue<uint32_t, 2> q;
boro 0:4beb2ea291ec 269
boro 0:4beb2ea291ec 270 osStatus stat = q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 0);
boro 0:4beb2ea291ec 271 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 272
boro 0:4beb2ea291ec 273 stat = q.put((uint32_t*) TEST_UINT_MSG2, TEST_TIMEOUT, 1);
boro 0:4beb2ea291ec 274 TEST_ASSERT_EQUAL(osOK, stat);
boro 0:4beb2ea291ec 275
boro 0:4beb2ea291ec 276 osEvent evt = q.get();
boro 0:4beb2ea291ec 277 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 278 TEST_ASSERT_EQUAL(TEST_UINT_MSG2, evt.value.v);
boro 0:4beb2ea291ec 279
boro 0:4beb2ea291ec 280 evt = q.get();
boro 0:4beb2ea291ec 281 TEST_ASSERT_EQUAL(osEventMessage, evt.status);
boro 0:4beb2ea291ec 282 TEST_ASSERT_EQUAL(TEST_UINT_MSG, evt.value.v);
boro 0:4beb2ea291ec 283 }
boro 0:4beb2ea291ec 284
boro 0:4beb2ea291ec 285 /** Test queue empty
boro 0:4beb2ea291ec 286
boro 0:4beb2ea291ec 287 Given a queue of uint32_t data
boro 0:4beb2ea291ec 288 before data is inserted the queue should be empty
boro 0:4beb2ea291ec 289 after data is inserted the queue shouldn't be empty
boro 0:4beb2ea291ec 290 */
boro 0:4beb2ea291ec 291 void test_queue_empty()
boro 0:4beb2ea291ec 292 {
boro 0:4beb2ea291ec 293 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 294
boro 0:4beb2ea291ec 295 TEST_ASSERT_EQUAL(true, q.empty());
boro 0:4beb2ea291ec 296
boro 0:4beb2ea291ec 297 q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
boro 0:4beb2ea291ec 298
boro 0:4beb2ea291ec 299 TEST_ASSERT_EQUAL(false, q.empty());
boro 0:4beb2ea291ec 300 }
boro 0:4beb2ea291ec 301
boro 0:4beb2ea291ec 302 /** Test queue empty
boro 0:4beb2ea291ec 303
boro 0:4beb2ea291ec 304 Given a queue of uint32_t data with size of 1
boro 0:4beb2ea291ec 305 before data is inserted the queue shouldn't be full
boro 0:4beb2ea291ec 306 after data is inserted the queue should be full
boro 0:4beb2ea291ec 307 */
boro 0:4beb2ea291ec 308 void test_queue_full()
boro 0:4beb2ea291ec 309 {
boro 0:4beb2ea291ec 310 Queue<uint32_t, 1> q;
boro 0:4beb2ea291ec 311
boro 0:4beb2ea291ec 312 TEST_ASSERT_EQUAL(false, q.full());
boro 0:4beb2ea291ec 313
boro 0:4beb2ea291ec 314 q.put((uint32_t*) TEST_UINT_MSG, TEST_TIMEOUT, 1);
boro 0:4beb2ea291ec 315
boro 0:4beb2ea291ec 316 TEST_ASSERT_EQUAL(true, q.full());
boro 0:4beb2ea291ec 317 }
boro 0:4beb2ea291ec 318
boro 0:4beb2ea291ec 319 utest::v1::status_t test_setup(const size_t number_of_cases)
boro 0:4beb2ea291ec 320 {
boro 0:4beb2ea291ec 321 GREENTEA_SETUP(5, "default_auto");
boro 0:4beb2ea291ec 322 return verbose_test_setup_handler(number_of_cases);
boro 0:4beb2ea291ec 323 }
boro 0:4beb2ea291ec 324
boro 0:4beb2ea291ec 325 Case cases[] = {
boro 0:4beb2ea291ec 326 Case("Test pass uint msg", test_pass_uint),
boro 0:4beb2ea291ec 327 Case("Test pass uint msg twice", test_pass_uint_twice),
boro 0:4beb2ea291ec 328 Case("Test pass ptr msg", test_pass_ptr),
boro 0:4beb2ea291ec 329 Case("Test get from empty queue no timeout", test_get_empty_no_timeout),
boro 0:4beb2ea291ec 330 Case("Test get from empty queue timeout", test_get_empty_timeout),
boro 0:4beb2ea291ec 331 Case("Test get empty wait forever", test_get_empty_wait_forever),
boro 0:4beb2ea291ec 332 Case("Test put full no timeout", test_put_full_no_timeout),
boro 0:4beb2ea291ec 333 Case("Test put full timeout", test_put_full_timeout),
boro 0:4beb2ea291ec 334 Case("Test put full wait forever", test_put_full_waitforever),
boro 0:4beb2ea291ec 335 Case("Test message ordering", test_msg_order),
boro 0:4beb2ea291ec 336 Case("Test message priority", test_msg_prio),
boro 0:4beb2ea291ec 337 Case("Test queue empty", test_queue_empty),
boro 0:4beb2ea291ec 338 Case("Test queue full", test_queue_full)
boro 0:4beb2ea291ec 339 };
boro 0:4beb2ea291ec 340
boro 0:4beb2ea291ec 341 Specification specification(test_setup, cases);
boro 0:4beb2ea291ec 342
boro 0:4beb2ea291ec 343 int main()
boro 0:4beb2ea291ec 344 {
boro 0:4beb2ea291ec 345 return !Harness::run(specification);
boro 0:4beb2ea291ec 346 }