From 0f311b303e8b664e6706c3cb7baff06c63b90140 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 20 Aug 2015 09:50:42 -0500 Subject: [PATCH] Documentation: Update testsuite example snippet to current best practices --- doc/developers/testsuite.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/developers/testsuite.html b/doc/developers/testsuite.html index c7ce129107..4397bd4d3e 100644 --- a/doc/developers/testsuite.html +++ b/doc/developers/testsuite.html @@ -570,7 +570,7 @@ category/test.expect=run.output
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2014 by the deal.II Authors
+// Copyright (C) 2015 by the deal.II Authors
 //
 // This file is part of the deal.II library.
 //
@@ -586,19 +586,17 @@ category/test.expect=run.output
 // a short (a few lines) description of what the program does
 
 #include "../tests.h"
-#include <iostream>
-#include <fstream>
 
 // all include files you need here
 
 int main ()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
-  deallog.depth_console(0);
+  // Initialize deallog for test output.
+  // This also reroutes deallog output to a file "output".
+  initlog();
 
   // your testcode here:
-  int i=0;
+  int i = 0;
   deallog << i << std::endl;
 
   return 0;
-- 
2.39.5