File: test-library-version.c

package info (click to toggle)
libinput 1.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,404 kB
  • sloc: ansic: 104,881; python: 3,570; sh: 183; makefile: 37; cpp: 7
file content (25 lines) | stat: -rw-r--r-- 392 bytes parent folder | download
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
#include <assert.h>
#include <stdio.h>

int
main(void)
{
	const char *version = LIBINPUT_LT_VERSION;
	int C, R, A;
	int rc;

	rc = sscanf(version, "%d:%d:%d", &C, &R, &A);
	assert(rc == 3);

	assert(C >= 17);
	assert(R >= 0);
	assert(A >= 7);

	/* Binary compatibility broken? */
	assert(R != 0 || A != 0);

	/* The first stable API in 0.12 had 10:0:0  */
	assert(C - A == 10);

	return 0;
}