From: Wolfgang Bangerth Date: Thu, 26 Aug 2010 09:16:23 +0000 (+0000) Subject: One more test. X-Git-Tag: v8.0.0~5681 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=790812938d70c84cb0dc27fe8afb8103d8d7e373;p=dealii.git One more test. git-svn-id: https://svn.dealii.org/trunk@21717 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/Makefile b/tests/base/Makefile index 0eed0491b5..48cba35a64 100644 --- a/tests/base/Makefile +++ b/tests/base/Makefile @@ -94,7 +94,8 @@ tests_x = geometry_info_* \ task_* \ parallel_* \ mutex_* \ - scalar_* + scalar_* \ + conditional_ostream # add threading tests. note that we have # to list them individually, without wildcards, because the .cc files are diff --git a/tests/base/conditional_ostream.cc b/tests/base/conditional_ostream.cc new file mode 100644 index 0000000000..d82a3b5df1 --- /dev/null +++ b/tests/base/conditional_ostream.cc @@ -0,0 +1,39 @@ +//---------------------------- conditional_ostream.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 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. +// +//---------------------------- conditional_ostream.cc --------------------------- + + +// test the functions of ConditionalOStream + + +#include "../tests.h" +#include +#include +#include +#include + + +int main() +{ + std::ofstream logfile("conditional_ostream/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + ConditionalOStream o(logfile, true); + o << "Yes" << std::endl; + deallog << o.is_active() << std::endl; + + o.set_condition (false); + o << "No" << std::endl; + deallog << o.is_active() << std::endl; +} diff --git a/tests/base/conditional_ostream/cmp/generic b/tests/base/conditional_ostream/cmp/generic new file mode 100644 index 0000000000..5a09d32e38 --- /dev/null +++ b/tests/base/conditional_ostream/cmp/generic @@ -0,0 +1,4 @@ + +Yes +DEAL::1 +DEAL::0