From e87b3adb2aa49f56693240a92e373dcb42d0771e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 8 Mar 2006 02:20:44 +0000 Subject: [PATCH] Another test, this time for infinities. git-svn-id: https://svn.dealii.org/trunk@12558 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/Makefile | 2 +- tests/base/log_infinity.cc | 34 +++++++++++++++++++++++++++++ tests/base/log_infinity/cmp/generic | 3 +++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/base/log_infinity.cc create mode 100644 tests/base/log_infinity/cmp/generic diff --git a/tests/base/Makefile b/tests/base/Makefile index 4740d14a05..6e5363909c 100644 --- a/tests/base/Makefile +++ b/tests/base/Makefile @@ -23,7 +23,7 @@ threads.cc : threads.pl @$(PERL) $^ > $@ tests_x = logtest \ - log_nan \ + log_* \ reference \ quadrature_* qprojector \ path_search \ diff --git a/tests/base/log_infinity.cc b/tests/base/log_infinity.cc new file mode 100644 index 0000000000..1bc503e98e --- /dev/null +++ b/tests/base/log_infinity.cc @@ -0,0 +1,34 @@ +//---------------------------- log_infinity.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005, 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- log_infinity.cc --------------------------- + +// similar to log_nan, but test for infinities + +#include "../tests.h" +#include +#include +#include + +int main () +{ + std::ofstream logfile("log_infinity/output"); + logfile.precision(3); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + deallog << std::numeric_limits::infinity() << std::endl; + deallog << -std::numeric_limits::infinity() << std::endl; + + return 0; +} + diff --git a/tests/base/log_infinity/cmp/generic b/tests/base/log_infinity/cmp/generic new file mode 100644 index 0000000000..6ea40dfa4a --- /dev/null +++ b/tests/base/log_infinity/cmp/generic @@ -0,0 +1,3 @@ + +DEAL::inf +DEAL::-inf -- 2.39.5