libgit2/tests/core/features.c
Carlos Martín Nieto 6bb54cbff3 Add a SecureTransport TLS channel
As an alternative to OpenSSL when we're on OS X. This one can actually
take advantage of stacking the streams.
2015-04-23 17:39:51 +02:00

32 lines
741 B
C

#include "clar_libgit2.h"
void test_core_features__0(void)
{
int major, minor, rev, caps;
git_libgit2_version(&major, &minor, &rev);
cl_assert_equal_i(LIBGIT2_VER_MAJOR, major);
cl_assert_equal_i(LIBGIT2_VER_MINOR, minor);
cl_assert_equal_i(LIBGIT2_VER_REVISION, rev);
caps = git_libgit2_features();
#ifdef GIT_THREADS
cl_assert((caps & GIT_FEATURE_THREADS) != 0);
#else
cl_assert((caps & GIT_FEATURE_THREADS) == 0);
#endif
#if defined(GIT_SSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
#else
cl_assert((caps & GIT_FEATURE_HTTPS) == 0);
#endif
#if defined(GIT_SSH)
cl_assert((caps & GIT_FEATURE_SSH) != 0);
#else
cl_assert((caps & GIT_FEATURE_SSH) == 0);
#endif
}