Added a base file test, fixed CMakeLists.txt flag handling, fixed a complaint
authorbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 18 Jan 2014 00:11:33 +0000 (00:11 +0000)
committerbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Sat, 18 Jan 2014 00:11:33 +0000 (00:11 +0000)
from --pedantic.

git-svn-id: https://svn.code.sf.net/p/freetel/code@1372 01035d8c-6547-0410-b346-abe4f91aad63

freedv-server/CMakeLists.txt
freedv-server/Doxyfile.in
freedv-server/source/drivers.h
freedv-server/source/test/base.cpp

index ee11e24de607b00a0d17a617fa316d36160dd2fc..b231b507f3baa5c0faa496c750b68f3495dc2ad6 100644 (file)
@@ -131,8 +131,7 @@ set(Test.headers
 )
 
 load_parameters(cxx-flags)
-set_source_files_properties(${Compile.sources} ${Optional.sources} ${Test.sources} PROPERTIES COMPILE_FLAGS "-std=c++11")
-set_source_files_properties(${Compile.sources} ${Optional.sources} ${Test.sources} PROPERTIES COMPILE_FLAGS "-std=c++11")
+set_source_files_properties(${Compile.sources} ${Optional.sources} ${Test.sources} PROPERTIES COMPILE_FLAGS ${Param.cxx-flags})
 
 
 add_executable(freedv-server ${Compile.sources} source/big_main.cpp)
index bcf6215a57c8532b0d244cd41e305a3e2e7054af..5420e168624d67f0ef76a83d55cf3e9de89f0d98 100644 (file)
@@ -614,7 +614,7 @@ RECURSIVE              = YES
 # excluded from the INPUT source files. This way you can easily exclude a 
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = "_darcs" "googletest"
+EXCLUDE                = "_darcs" "googletest" "source/test"
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
 # directories that are symbolic links (a Unix filesystem feature) are excluded 
index f5676d1ff73b10c631364f8f4813a28ffba33675..f922b395db5cc871df17ef77330520ad3f8900d2 100644 (file)
@@ -452,7 +452,7 @@ namespace FreeDV {
     PTTInput *         PTTConstant(const char * parameter);
     TextInput *                TextConstant(const char * parameter);
     UserInterface *    BlankPanel(const char * parameter, Interfaces *);
-  };
+  }
 }
 
 #ifndef NO_INITIALIZERS
index 01c9ab08a06ecadb96cc97c6d2ae4bcc87d7f877..b880cce1a2bc78ab571da0e6dba7b6909644087e 100644 (file)
@@ -1,6 +1,7 @@
 // Tests for the Base class.
 #include <drivers.h>
 #include <gtest/gtest.h>
+#include <sstream>
 
 using namespace FreeDV;
 
@@ -24,5 +25,14 @@ protected:
 };
 
 TEST_F(BaseTest, CaptiveIsFalse) {
+  // The base class version of captive() and the one inherited by AudioSink,
+  // must always return false. Only an interface that is owned by the
+  // UserInterface class can return true.
   ASSERT_FALSE(b->captive());
 }
+
+TEST_F(BaseTest, PrintsItself) {
+  std::stringstream stream;
+  stream << *b;
+  ASSERT_STREQ("sink:", stream.str().c_str());
+}