File: test-mongoc-version.c

package info (click to toggle)
syslog-ng 3.8.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 47,320 kB
  • ctags: 43,937
  • sloc: ansic: 159,432; yacc: 25,059; sh: 13,574; makefile: 4,669; python: 3,468; java: 3,218; xml: 2,309; perl: 318; lex: 316; awk: 184
file content (26 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <mongoc.h>

#include "TestSuite.h"

static void
test_mongoc_version (void)
{
   ASSERT_CMPINT (mongoc_get_major_version(), ==, MONGOC_MAJOR_VERSION);
   ASSERT_CMPINT (mongoc_get_minor_version(), ==, MONGOC_MINOR_VERSION);
   ASSERT_CMPINT (mongoc_get_micro_version(), ==, MONGOC_MICRO_VERSION);
   ASSERT_CMPSTR (mongoc_get_version(), MONGOC_VERSION_S);

   ASSERT (mongoc_check_version (MONGOC_MAJOR_VERSION,
                                 MONGOC_MINOR_VERSION,
                                 MONGOC_MICRO_VERSION));

   ASSERT (!mongoc_check_version (MONGOC_MAJOR_VERSION,
                                  MONGOC_MINOR_VERSION + 1,
                                  MONGOC_MICRO_VERSION));
}

void
test_version_install (TestSuite *suite)
{
   TestSuite_Add (suite, "/Version", test_mongoc_version);
}