From 0b9e5c705fe0201d008e81eb627ed4a74fde0f71 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 14 Sep 2012 16:26:38 +0000 Subject: [PATCH] add failing test for deallog git-svn-id: https://svn.dealii.org/trunk@26388 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/log_crash_01.cc | 38 +++++++++++++++++++++++++++++ tests/base/log_crash_01/cmp/generic | 7 ++++++ 2 files changed, 45 insertions(+) create mode 100644 tests/base/log_crash_01.cc create mode 100644 tests/base/log_crash_01/cmp/generic diff --git a/tests/base/log_crash_01.cc b/tests/base/log_crash_01.cc new file mode 100644 index 0000000000..8057f59510 --- /dev/null +++ b/tests/base/log_crash_01.cc @@ -0,0 +1,38 @@ +//---------------------------- logtest.cc --------------------------- +// $Id: logtest.cc 23710 2011-05-17 04:50:10Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 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. +// +//---------------------------- logtest.cc --------------------------- + + +// document crash in deallog related to missing newline + + +#include "../tests.h" +#include +#include +#include +#include + + +int main() +{ + std::ofstream logfile("log_crash_01/output"); + deallog.attach(logfile); + deallog.depth_console(0); + + deallog.push("1"); + { + deallog.threshold_double(1.e-10); + deallog.push("2"); + deallog << "no newline here!"; + deallog.pop(); + } +} diff --git a/tests/base/log_crash_01/cmp/generic b/tests/base/log_crash_01/cmp/generic new file mode 100644 index 0000000000..035550ac63 --- /dev/null +++ b/tests/base/log_crash_01/cmp/generic @@ -0,0 +1,7 @@ + +DEAL::Test +DEAL:l1::Test1 +DEAL:l1:l2::Test2Test3 +DEAL:l1:l2::Test4Test5 +DEAL:l1::Test6 +DEAL::Test7 -- 2.39.5