From: Wolfgang Bangerth Date: Fri, 17 Jul 2015 12:04:46 +0000 (-0500) Subject: Make test work on clang. X-Git-Tag: v8.4.0-rc2~752^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1150%2Fhead;p=dealii.git Make test work on clang. clang outputs '(nil)' when printing a null pointer, rather than '0'. This is not a bad idea I suppose, but it is incompatible with other compilers. Change the test to just always do it. --- diff --git a/tests/algorithms/any_data_01.cc b/tests/algorithms/any_data_01.cc index fd0c47fae9..88200b64e4 100644 --- a/tests/algorithms/any_data_01.cc +++ b/tests/algorithms/any_data_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -62,9 +62,18 @@ void extract(const AnyData& data) << *p2 << std::endl << *p3 << std::endl; - deallog << *data.try_read(" d 17.") << std::endl - << data.try_read(" d 17.") << std::endl - << data.try_read("does not exist") << std::endl; + deallog << *data.try_read(" d 17.") << std::endl; + + if (data.try_read(" d 17.") == 0) + deallog << "(nil)" << std::endl; + else + AssertThrow (false, ExcInternalError()); + + if (data.try_read("does not exist") == 0) + deallog << "(nil)" << std::endl; + else + AssertThrow (false, ExcInternalError()); + // try // { // double* p3a = data.entry("cd* 17."); diff --git a/tests/algorithms/any_data_01.output b/tests/algorithms/any_data_01.output index 9e180107c2..a0c2345350 100644 --- a/tests/algorithms/any_data_01.output +++ b/tests/algorithms/any_data_01.output @@ -13,5 +13,5 @@ DEAL::17.0000 DEAL::18.0000 DEAL::18.0000 DEAL::17.0000 -DEAL::0 -DEAL::0 +DEAL::(nil) +DEAL::(nil)