]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use Assert instead of assert.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 15:41:10 +0000 (15:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Apr 2010 15:41:10 +0000 (15:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@20954 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/block_vector_copy.cc

index c4d437b9a72f5ee52ff41770fe5c40111cf595ac..8d0040e95e735399a8fb88d146836ddad9f24f08 100644 (file)
@@ -1,8 +1,8 @@
 //--------------------------------------------------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2008, 2009 by the deal.II authors
+//    Copyright (C) 2008, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -38,21 +38,21 @@ void test ()
   unsigned int                 size = 0;
   for (unsigned int i = 0; i < b.n_blocks(); ++i)
     {
-      assert (b.block(i).size() == partition[i]);
+      Assert (b.block(i).size() == partition[i], ExcInternalError());
       size += b.block(i).size();
     }
-  assert (b.size() == size);
+  Assert (b.size() == size, ExcInternalError());
 
   for (unsigned int i = 0; i < b.size(); ++i)
     {
       b(i) = v[i];
-      assert (b(i) == v[i]);
+      Assert (b(i) == v[i], ExcInternalError());
     }
 
   dealii::BlockVector<double>  c;
   c = b;
-  assert (c == b);
-  assert (c.n_blocks() == b.n_blocks());
+  Assert (c == b, ExcInternalError());
+  Assert (c.n_blocks() == b.n_blocks(), ExcInternalError());
 
   deallog << "OK" << std::endl;
 }
@@ -77,7 +77,7 @@ int main ()
   streambuf *old_cerr_buf = std::cerr.rdbuf();
 #endif
   std::cerr.rdbuf(logfile.rdbuf());
-  
+
   try
     {
       test ();
@@ -94,7 +94,7 @@ int main ()
                                       // abort
       return 0;
     }
-  catch (...) 
+  catch (...)
     {
       std::cerr << std::endl << std::endl
           << "----------------------------------------------------"
@@ -106,7 +106,7 @@ int main ()
                                       // abort
       return 0;
     };
-  
+
   std::cerr.rdbuf(old_cerr_buf);
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.