Merge pull request #15438 from aabadie/pr/tests/sys_atomic_unittest

tests/unittests: split out atomic_utils unittests
This commit is contained in:
Alexandre Abadie 2020-11-13 10:33:44 +01:00 committed by GitHub
commit 4c9ee5d075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 43 deletions

View File

@ -0,0 +1,7 @@
include ../Makefile.tests_common
USEMODULE += embunit
USEMODULE += atomic_utils
USEMODULE += random # <-- used for input data to operate on
include $(RIOTBASE)/Makefile.include

View File

@ -7,6 +7,7 @@
*/
/**
* @ingroup tests
* @{
*
* @file
@ -20,7 +21,6 @@
#include <string.h>
#include "embUnit.h"
#include "tests-atomic_utils.h"
#include "atomic_utils.h"
#include "random.h"
@ -280,7 +280,11 @@ Test *tests_atomic_utils_tests(void)
return (Test *)&atomic_utils_tests;
}
void tests_atomic_utils(void)
int main(void)
{
TESTS_START();
TESTS_RUN(tests_atomic_utils_tests());
TESTS_END();
return 0;
}

View File

@ -0,0 +1,14 @@
#!/usr/bin/env python3
# Copyright (C) 2020 Inria
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run_check_unittests
if __name__ == "__main__":
sys.exit(run_check_unittests())

View File

@ -1 +0,0 @@
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +0,0 @@
USEMODULE += atomic_utils
USEMODULE += random # <-- used for input data to operate on

View File

@ -1,38 +0,0 @@
/*
* Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @addtogroup unittests
* @{
*
* @file
* @brief Unittests for the atomic util module
*
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
*/
#ifndef TESTS_ATOMIC_UTILS_H
#define TESTS_ATOMIC_UTILS_H
#include "embUnit.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The entry point of this test suite.
*/
void tests_atomic_util(void);
#ifdef __cplusplus
}
#endif
#endif /* TESTS_ATOMIC_UTILS_H */
/** @} */