From: Matthias Maier Date: Thu, 17 Aug 2017 05:25:37 +0000 (-0500) Subject: Add a test X-Git-Tag: v9.0.0-rc1~1224^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4885%2Fhead;p=dealii.git Add a test --- diff --git a/tests/a-framework/preprocessor_macros.cc b/tests/a-framework/preprocessor_macros.cc new file mode 100644 index 0000000000..e33a2c7350 --- /dev/null +++ b/tests/a-framework/preprocessor_macros.cc @@ -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 index 0000000000..f8c40435d6 --- /dev/null +++ b/tests/a-framework/preprocessor_macros.debug.output @@ -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 index 0000000000..9c6f32512e --- /dev/null +++ b/tests/a-framework/preprocessor_macros.release.output @@ -0,0 +1,2 @@ + +DEAL::DEBUG undefined!