diff options
author | Daniel Agar <daniel@agar.ca> | 2015-01-07 23:17:31 -0500 |
---|---|---|
committer | Daniel Agar <daniel@agar.ca> | 2015-01-07 23:17:31 -0500 |
commit | cc2d0f00d6826d050c1f9e852970dd409946ee0d (patch) | |
tree | f5d6fa3baa7af72dff0d99f0f9e60de537102fd8 | |
parent | a4db73dad894e7b6f6920fcd1184127f9c997201 (diff) | |
download | px4-firmware-cc2d0f00d6826d050c1f9e852970dd409946ee0d.tar.gz px4-firmware-cc2d0f00d6826d050c1f9e852970dd409946ee0d.tar.bz2 px4-firmware-cc2d0f00d6826d050c1f9e852970dd409946ee0d.zip |
move sf0x_test to gtest
-rw-r--r-- | unittests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | unittests/sf0x_test.cpp | 20 |
2 files changed, 7 insertions, 14 deletions
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 247ddbb3d..666570a71 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -69,6 +69,5 @@ add_executable(st24_test st24_test.cpp hrt.cpp ${PX_SRC}/lib/rc/st24.c) add_gtest(st24_test) # sf0x_test -# TODO: move to gtest add_executable(sf0x_test sf0x_test.cpp ${PX_SRC}/drivers/sf0x/sf0x_parser.cpp) add_gtest(sf0x_test) diff --git a/unittests/sf0x_test.cpp b/unittests/sf0x_test.cpp index 1af128bbe..ffaaaf04a 100644 --- a/unittests/sf0x_test.cpp +++ b/unittests/sf0x_test.cpp @@ -1,19 +1,15 @@ - -#include <unistd.h> -#include <string.h> -#include <stdlib.h> #include <stdio.h> -#include <systemlib/err.h> -#include <drivers/drv_hrt.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <drivers/drv_hrt.h> #include <drivers/sf0x/sf0x_parser.h> +#include <systemlib/err.h> -int main(int argc, char *argv[]) -{ - warnx("SF0X test started"); - - int ret = 0; +#include "gtest/gtest.h" +TEST(SF0XTest, SF0X) { const char LINE_MAX = 20; char _linebuf[LINE_MAX]; _linebuf[0] = '\0'; @@ -60,6 +56,4 @@ int main(int argc, char *argv[]) } warnx("test finished"); - - return ret; } |