LMMP
4.3.0
Lamina High-Precision Arithmetic Library
Toggle main menu visibility
载入中...
搜索中...
未找到
test_version.c
浏览该文件的文档.
1
/**
2
* Copyright (C) 2026 HJimmyK (Jericho Knox)
3
*
4
* This file is part of LMMP.
5
*
6
* LMMP is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License as
8
* published by the Free Software Foundation; either version 3 of
9
* the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see
18
* <https://www.gnu.org/licenses/>.
19
*
20
* SPDX-License-Identifier: LGPL-3.0-or-later
21
*/
22
23
#include "
lmmp/lmmpn.h
"
24
#include "
lmmp/mprand.h
"
25
#include "
lmmp/secret.h
"
26
#include "
lmmp/version.h
"
27
#include "
cases.h
"
28
#include "
support/lmmp_test_utils.h
"
29
30
#include <string.h>
31
32
TEST_CASE
(
"misc/version"
, version_strings) {
33
const
char
* v =
lmmp_get_version
();
34
const
char
* b =
lmmp_get_build_type
();
35
TEST_CHECK_MSG
(v != NULL && strlen(v) > 0,
"version string nonempty"
);
36
TEST_CHECK_MSG
(b != NULL && strlen(b) > 0,
"build type string nonempty"
);
37
}
38
39
void
test_version
(
void
) {
40
TEST_RUN
(
"misc/version"
, version_strings);
41
}
cases.h
test_version
void test_version(void)
定义
test_version.c:39
lmmp_test_utils.h
lmmpn.h
mprand.h
secret.h
TEST_CHECK_MSG
#define TEST_CHECK_MSG(cond, msg)
定义
test.h:38
TEST_CASE
#define TEST_CASE(category, name)
定义
test.h:35
TEST_RUN
#define TEST_RUN(category, name)
定义
test.h:36
version.h
lmmp_get_build_type
const char * lmmp_get_build_type(void)
获取 LMMP 的构建类型字符串.
定义
version.c:30
lmmp_get_version
const char * lmmp_get_version(void)
Copyright (C) 2026 HJimmyK (Jericho Knox)
定义
version.c:26
src
lmmp
lmmp
test
test_version.c
生成于
, 为 LMMP使用
1.18.0