aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/main.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-06-25 11:42:04 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-06-25 11:42:04 +0200
commit95f8a738ea23cf7d6f86ca99eddb5b22045c7f4b (patch)
tree3da2bd15b9159ad1aa37c9995eb651c3a0e5e688 /test/main.h
parent4cc937794117a27c7a1d2643fdadd242dc83359a (diff)
Introduce a TEST_SET_BUT_UNUSED_VARIABLE macro for initialized but unused variables in the unit tests and also fix a few other warnings.
Diffstat (limited to 'test/main.h')
-rw-r--r--test/main.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/main.h b/test/main.h
index 1094b6b36..0d65d64c1 100644
--- a/test/main.h
+++ b/test/main.h
@@ -31,6 +31,10 @@
// B0 is defined in POSIX header termios.h
#define B0 FORBIDDEN_IDENTIFIER
+
+// shuts down ICC's remark #593: variable "XXX" was set but never used
+#define TEST_SET_BUT_UNUSED_VARIABLE(X) X = X + 0;
+
// the following file is automatically generated by cmake
#include "split_test_helper.h"
@@ -380,13 +384,13 @@ template<typename T> struct GetDifferentType<std::complex<T> >
// Forward declaration to avoid ICC warning
template<typename T> std::string type_name();
-template<typename T> std::string type_name() { return "other"; }
-template<> std::string type_name<float>() { return "float"; }
-template<> std::string type_name<double>() { return "double"; }
-template<> std::string type_name<int>() { return "int"; }
-template<> std::string type_name<std::complex<float> >() { return "complex<float>"; }
+template<typename T> std::string type_name() { return "other"; }
+template<> std::string type_name<float>() { return "float"; }
+template<> std::string type_name<double>() { return "double"; }
+template<> std::string type_name<int>() { return "int"; }
+template<> std::string type_name<std::complex<float> >() { return "complex<float>"; }
template<> std::string type_name<std::complex<double> >() { return "complex<double>"; }
-template<> std::string type_name<std::complex<int> >() { return "complex<int>"; }
+template<> std::string type_name<std::complex<int> >() { return "complex<int>"; }
// forward declaration of the main test function
void EIGEN_CAT(test_,EIGEN_TEST_FUNC)();