Skip to content

Commit

Permalink
tests: adapt libfixmath tests for change
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed May 17, 2016
1 parent f6ac372 commit f6e3fbb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/libfixmath/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ APPLICATION = libfixmath
include ../Makefile.tests_common

USEPKG += libfixmath
USEMODULE += libfixmath

include $(RIOTBASE)/Makefile.include
2 changes: 2 additions & 0 deletions tests/libfixmath_unittests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ BOARD_BLACKLIST := arduino-mega2560
# The MSP boards don't feature round(), exp(), and log(), which are used in the unittests
BOARD_BLACKLIST += chronos msb-430 msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1

BOARD_INSUFFICIENT_MEMORY := weio

USEMODULE += libfixmath-unittests

ifneq (,$(filter native qemu-i386,$(BOARD)))
Expand Down
8 changes: 7 additions & 1 deletion tests/libfixmath_unittests/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@
*/

#include <stdio.h>
#include "libfixmath-unittests.h"

#define RUN(x) if (x() != 0) { return 1; }

int main(void)
{
#include "fix16_unittests.inc"
RUN(fix16_exp_unittests);
RUN(fix16_macros_unittests);
RUN(fix16_str_unittests);
RUN(fix16_unittests);

puts("All tests executed.");
return 0;
Expand Down

0 comments on commit f6e3fbb

Please sign in to comment.