]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test 4885/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 17 Aug 2017 05:25:37 +0000 (00:25 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 17 Aug 2017 05:26:16 +0000 (00:26 -0500)
tests/a-framework/preprocessor_macros.cc [new file with mode: 0644]
tests/a-framework/preprocessor_macros.debug.output [new file with mode: 0644]
tests/a-framework/preprocessor_macros.release.output [new file with mode: 0644]

diff --git a/tests/a-framework/preprocessor_macros.cc b/tests/a-framework/preprocessor_macros.cc
new file mode 100644 (file)
index 0000000..e33a2c7
--- /dev/null
@@ -0,0 +1,35 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+
+// test the testsuite framework.
+
+// This test checks whether the cmake configuration correctly exports
+// preprocessor definitions, in particular whether the DEBUG maro is
+// defined in debug mode.
+
+#include "../tests.h"
+
+int main ()
+{
+  initlog();
+#ifdef DEBUG
+  deallog << "DEBUG defined!" << std::endl;
+#else
+  deallog << "DEBUG undefined!" << std::endl;
+#endif
+}
+
diff --git a/tests/a-framework/preprocessor_macros.debug.output b/tests/a-framework/preprocessor_macros.debug.output
new file mode 100644 (file)
index 0000000..f8c4043
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::DEBUG defined!
diff --git a/tests/a-framework/preprocessor_macros.release.output b/tests/a-framework/preprocessor_macros.release.output
new file mode 100644 (file)
index 0000000..9c6f325
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::DEBUG undefined!

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.