features: move version tests out of features test

Move the test for querying version information out of the
`core::features` test and into the `core::version` test.
This commit is contained in:
Edward Thomson
2024-12-22 08:44:37 +00:00
parent 4dcdb64c68
commit f866bb97bf
2 changed files with 12 additions and 9 deletions

View File

@@ -1,15 +1,8 @@
#include "clar_libgit2.h"
void test_core_features__0(void)
void test_core_features__basic(void)
{
int major, minor, rev, caps;
git_libgit2_version(&major, &minor, &rev);
cl_assert_equal_i(LIBGIT2_VERSION_MAJOR, major);
cl_assert_equal_i(LIBGIT2_VERSION_MINOR, minor);
cl_assert_equal_i(LIBGIT2_VERSION_REVISION, rev);
caps = git_libgit2_features();
int caps = git_libgit2_features();
#ifdef GIT_THREADS
cl_assert((caps & GIT_FEATURE_THREADS) != 0);

View File

@@ -1,5 +1,15 @@
#include "clar_libgit2.h"
void test_core_version__query(void)
{
int major, minor, rev;
git_libgit2_version(&major, &minor, &rev);
cl_assert_equal_i(LIBGIT2_VERSION_MAJOR, major);
cl_assert_equal_i(LIBGIT2_VERSION_MINOR, minor);
cl_assert_equal_i(LIBGIT2_VERSION_REVISION, rev);
}
void test_core_version__check(void)
{
#if !LIBGIT2_VERSION_CHECK(1,6,3)