Blame tests/core/features.c
|
Packit Service |
20376f |
#include "clar_libgit2.h"
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
void test_core_features__0(void)
|
|
Packit Service |
20376f |
{
|
|
Packit Service |
20376f |
int major, minor, rev, caps;
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
git_libgit2_version(&major, &minor, &rev;;
|
|
Packit Service |
20376f |
cl_assert_equal_i(LIBGIT2_VER_MAJOR, major);
|
|
Packit Service |
20376f |
cl_assert_equal_i(LIBGIT2_VER_MINOR, minor);
|
|
Packit Service |
20376f |
cl_assert_equal_i(LIBGIT2_VER_REVISION, rev);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
caps = git_libgit2_features();
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#ifdef GIT_THREADS
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_THREADS) != 0);
|
|
Packit Service |
20376f |
#else
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_THREADS) == 0);
|
|
Packit Service |
20376f |
#endif
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#ifdef GIT_HTTPS
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
|
|
Packit Service |
20376f |
#endif
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#if defined(GIT_SSH)
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_SSH) != 0);
|
|
Packit Service |
20376f |
#else
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_SSH) == 0);
|
|
Packit Service |
20376f |
#endif
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#if defined(GIT_USE_NSEC)
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_NSEC) != 0);
|
|
Packit Service |
20376f |
#else
|
|
Packit Service |
20376f |
cl_assert((caps & GIT_FEATURE_NSEC) == 0);
|
|
Packit Service |
20376f |
#endif
|
|
Packit Service |
20376f |
}
|