2015-09-14 17:20:12 +08:00
|
|
|
/****************************************************************************
|
2017-01-27 01:05:12 +08:00
|
|
|
** Copyright (c) 2017, Fougue Ltd. <http://www.fougue.pro>
|
2016-07-05 18:46:22 +08:00
|
|
|
** All rights reserved.
|
2015-09-14 17:20:12 +08:00
|
|
|
**
|
2016-07-05 18:46:22 +08:00
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
2015-09-14 17:20:12 +08:00
|
|
|
**
|
2016-07-05 18:46:22 +08:00
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
**
|
|
|
|
** 2. Redistributions in binary form must reproduce the above
|
|
|
|
** copyright notice, this list of conditions and the following
|
|
|
|
** disclaimer in the documentation and/or other materials provided
|
|
|
|
** with the distribution.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2015-09-14 17:20:12 +08:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include "utest_lib.h"
|
|
|
|
|
2017-03-29 18:04:11 +08:00
|
|
|
#include "../src/gmio_core/memblock.h"
|
|
|
|
static struct gmio_memblock g_testcore_memblock;
|
|
|
|
|
2016-06-16 16:29:27 +08:00
|
|
|
#include "test_core.c"
|
|
|
|
#include "test_core_benchmark_fast_atof.c"
|
|
|
|
#include "test_core_internal.c"
|
|
|
|
#include "test_core_platform.c"
|
2015-09-14 17:20:12 +08:00
|
|
|
|
2017-03-29 16:37:05 +08:00
|
|
|
void all_tests()
|
2015-09-14 17:20:12 +08:00
|
|
|
{
|
2017-03-29 18:04:11 +08:00
|
|
|
g_testcore_memblock = gmio_memblock_calloc(32, 1024); /* 32KB */
|
|
|
|
|
2015-09-14 17:20:12 +08:00
|
|
|
UTEST_RUN(test_core__buffer);
|
|
|
|
UTEST_RUN(test_core__endian);
|
|
|
|
UTEST_RUN(test_core__error);
|
|
|
|
UTEST_RUN(test_core__stream);
|
|
|
|
|
2016-06-16 16:29:27 +08:00
|
|
|
UTEST_RUN(test_platform__global_h);
|
|
|
|
UTEST_RUN(test_platform__compiler);
|
|
|
|
|
2015-09-14 17:20:12 +08:00
|
|
|
UTEST_RUN(test_internal__byte_swap);
|
|
|
|
UTEST_RUN(test_internal__byte_codec);
|
2017-01-27 00:23:03 +08:00
|
|
|
UTEST_RUN(test_internal__const_string);
|
2015-09-14 17:20:12 +08:00
|
|
|
UTEST_RUN(test_internal__fast_atof);
|
2016-07-05 17:28:44 +08:00
|
|
|
UTEST_RUN(test_internal__locale_utils);
|
2016-10-27 23:42:24 +08:00
|
|
|
UTEST_RUN(test_internal__error_check);
|
2017-03-20 23:22:15 +08:00
|
|
|
UTEST_RUN(test_internal__itoa);
|
2016-07-29 19:16:25 +08:00
|
|
|
UTEST_RUN(test_internal__ostringstream);
|
2015-09-14 17:20:12 +08:00
|
|
|
UTEST_RUN(test_internal__safe_cast);
|
2015-11-20 18:53:57 +08:00
|
|
|
UTEST_RUN(test_internal__stringstream);
|
2016-07-05 17:28:44 +08:00
|
|
|
UTEST_RUN(test_internal__string_ascii_utils);
|
2016-01-12 23:32:11 +08:00
|
|
|
UTEST_RUN(test_internal__benchmark_gmio_fast_atof);
|
2017-01-18 01:42:36 +08:00
|
|
|
UTEST_RUN(test_internal__zip_utils);
|
2017-01-20 00:49:11 +08:00
|
|
|
UTEST_RUN(test_internal__zlib_enumvalues);
|
2017-01-27 00:23:03 +08:00
|
|
|
UTEST_RUN(test_internal__file_utils);
|
2017-03-29 18:04:11 +08:00
|
|
|
|
|
|
|
gmio_memblock_deallocate(&g_testcore_memblock);
|
2015-09-14 17:20:12 +08:00
|
|
|
}
|
|
|
|
UTEST_MAIN(all_tests)
|