tests: Add random.c and random.h files
The purpose of random.c file is to contain the helper functions to generate random numbers that have been in helpers.function so far. The purpose of random.h is to contain the interface exposed by random.c thus helper function prototypes. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
f40529d5f4
commit
b7eb67fb74
3 changed files with 62 additions and 0 deletions
35
tests/include/test/random.h
Normal file
35
tests/include/test/random.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* \file random.h
|
||||
*
|
||||
* \brief This file contains the prototypes of helper functions to generate
|
||||
* random numbers for the purpose of testing.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2020, ARM Limited, All Rights Reserved
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
||||
*/
|
||||
|
||||
#ifndef TEST_RANDOM_H
|
||||
#define TEST_RANDOM_H
|
||||
|
||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||
#include "mbedtls/config.h"
|
||||
#else
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#endif /* TEST_RANDOM_H */
|
26
tests/src/random.c
Normal file
26
tests/src/random.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* \file random.c
|
||||
*
|
||||
* \brief This file contains the helper functions to generate random numbers
|
||||
* for the purpose of testing.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2020, ARM Limited, All Rights Reserved
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
||||
*/
|
||||
|
||||
#include <test/random.h>
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <test/macros.h>
|
||||
#include <test/helpers.h>
|
||||
#include <test/random.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue