blob: a42523fafae54ffc8776180ca4e497745858a8e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* Copyright (c) 2015, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <odp.h>
#include <odp_cunit_common.h>
#include "random.h"
/* Helper macro for CU_TestInfo initialization */
#define _CU_TEST_INFO(test_func) {#test_func, test_func}
static void random_test_get_size(void)
{
int32_t ret;
uint8_t buf[32];
ret = odp_random_data(buf, sizeof(buf), false);
CU_ASSERT(ret == sizeof(buf));
}
static CU_TestInfo random_suite[] = {
_CU_TEST_INFO(random_test_get_size),
CU_TEST_INFO_NULL,
};
static CU_SuiteInfo random_suites[] = {
{"Random", NULL, NULL, NULL, NULL, random_suite},
CU_SUITE_INFO_NULL,
};
int random_main(void)
{
return odp_cunit_run(random_suites);
}
|