--- /dev/null
+#!/bin/sh
+
+if [ ! -f configure ] ; then
+ ./autogen.sh
+fi
+
+CXXFLAGS='--coverage -O0' ./configure
+
+make check
+cd tests; make cov
\ No newline at end of file
check-% : %.test all
@srcdir=$(srcdir); export srcdir;
+cov-reset:
+ rm -fr coverage
+ find . -name "*.gcda" -exec rm {} \;
+ find . -name "*.gcno" -exec rm {} \;
+ lcov --directory . --zerocounters
+
+cov-report:
+ mkdir -p coverage
+ lcov --compat-libtool --directory . --capture --output-file coverage/app.info
+ genhtml -o coverage/ coverage/app.info
+
+cov:
+ make cov-report
+
+clean-local:
+ make cov-reset
+
descriptive_holds_data_test_SOURCES = descriptive/holds_data.cpp
callable_invokes_provided_function_test_SOURCES = callable/invokes_provided_function.cpp
--- /dev/null
+#include "callable.h"
+
+using namespace command;
+
+template<typename ArgumentType>
+class TestCallable : public Callable<ArgumentType> {
+public:
+ TestCallable(void (*function)(ArgumentType))
+ : Callable<ArgumentType>(function) {
+ }
+
+ void callFunction(ArgumentType test) {
+ this->call(test);
+ }
+};
+
+template<>
+class TestCallable<void> : public Callable<void> {
+public:
+ TestCallable(void (*function)(void))
+ : Callable<void>(function) {
+ }
+
+ void callFunction() {
+ this->call();
+ }
+};