Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Makefile.in
Makefile
.[^.]*
*.tar.gz
*~
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: c
compiler:
- gcc
matrix:
include:
- os: linux
dist: xenial
- os: linux
dist: trusty
- os: linux
dist: bionic
- os: osx
script:
- autoreconf -i -f
- ./configure --enable-debug
- make
- make check
10 changes: 8 additions & 2 deletions lib/util/num_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
*/

#include <assert.h>
#include <error.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include "hidrd/util/num.h"

#define FMT_u32 "%u"
Expand All @@ -36,7 +37,12 @@
#define FMT_s8 "%hhd"

#define ERROR(_fmt, _args...) \
error_at_line(1, 0, __FILE__, __LINE__, _fmt, ##_args)
do { \
fprintf(stderr, "%s:%s:%u: " _fmt "\n", \
program_invocation_name, __FILE__, __LINE__, \
##_args); \
exit(1); \
} while (0)

#define PASS_FROM_STR(_t, _v, _s, _m, _b) \
do { \
Expand Down
12 changes: 10 additions & 2 deletions lib/util/ttbl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,22 @@

#include <assert.h>
#include <errno.h>
#include <error.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "hidrd/util/ttbl.h"

#define ERROR(_errno, _fmt, _args...) \
error_at_line(1, _errno, __FILE__, __LINE__, _fmt, ##_args)
do { \
fprintf(stderr, "%s:%s:%u: " _fmt, \
program_invocation_name, __FILE__, __LINE__, \
##_args); \
if ((_errno) != 0) { \
fprintf(stderr, ": %s", strerror(_errno)); \
} \
fprintf(stderr, "\n"); \
exit(1); \
} while (0)

#define CHECK_RENDER(_expected) \
do { \
Expand Down