From cc2d0f00d6826d050c1f9e852970dd409946ee0d Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 7 Jan 2015 23:17:31 -0500 Subject: [PATCH] move sf0x_test to gtest --- unittests/CMakeLists.txt | 1 - unittests/sf0x_test.cpp | 20 +++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 247ddbb3d2..666570a71e 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 1af128bbe4..ffaaaf04aa 100644 --- a/unittests/sf0x_test.cpp +++ b/unittests/sf0x_test.cpp @@ -1,19 +1,15 @@ - -#include -#include -#include #include -#include +#include +#include +#include + #include - #include +#include -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; }