]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix tests (throw in assert change)
authorTimo Heister <timo.heister@gmail.com>
Fri, 15 Feb 2013 22:31:47 +0000 (22:31 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 15 Feb 2013 22:31:47 +0000 (22:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@28412 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
tests/fe/block_mask_02.cc
tests/fe/block_mask_06.cc
tests/fe/block_mask_06/cmp/generic
tests/fe/block_mask_07.cc
tests/fe/block_mask_07/cmp/generic
tests/fe/component_mask_02.cc
tests/fe/component_mask_06.cc
tests/fe/component_mask_06/cmp/generic
tests/fe/component_mask_07.cc
tests/fe/component_mask_07/cmp/generic
tests/fe/component_mask_14.cc
tests/fe/component_mask_14/cmp/generic

index 5de16409066c70af1dc561da09befb32db53fd34..e0f69cf13d483158e070c0d86f046124c210503a 100644 (file)
@@ -39,7 +39,13 @@ void test ()
     Assert (m[i] == v[i], ExcInternalError());
 
                                   // this needs to throw an exception
-  m[v.size()];
+  try
+    {
+      m[v.size()];
+    }
+  catch (...)
+    {
+    }
 
   deallog << "OK" << std::endl;
 }
index ae4806ec24f065347ce27466a4f4d9a8822b3cde..db9d79c13968d7e6be67e85cf651e1391648017c 100644 (file)
@@ -44,8 +44,15 @@ void test ()
 
                                   // this now must throw an exception,
                                   // though:
-  Assert (BlockMask(12,true).n_selected_blocks(13) == 12,
-         ExcInternalError());
+  try 
+    {
+      Assert (BlockMask(12,true).n_selected_blocks(13) == 12,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
+  
 }
 
 
index ad52b7c16b86bad6845829f9375a0c6d12cd9dc3..1d6e01e408481c8c1670a516f6dbe2a53ac057d3 100644 (file)
@@ -1,4 +1,3 @@
 
 DEAL::OK
 DEAL::ExcDimensionMismatch((n),(size()))
-DEAL::ExcDimensionMismatch((real_n),(block_mask.size()))
index b8f771bd28711ec791587a38d2865e08da665a81..65d3af7b22ad64f28601602ea3034b8ccf244a79 100644 (file)
@@ -45,11 +45,24 @@ void test ()
   deallog << "OK" << std::endl;
 
                                   // the following should yield an exception:
-  Assert (BlockMask(12,true).first_selected_block(13) == 0,
-         ExcInternalError());
-                                  // as should this:
-  Assert (BlockMask(12,false).first_selected_block() == 0,
-         ExcInternalError());
+  try 
+    {
+      Assert (BlockMask(12,true).first_selected_block(13) == 0,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
+  
+                                  // as should this: 
+  try 
+    {
+      Assert (BlockMask(12,false).first_selected_block() == 0,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
 }
 
 
index 52f4cc407b93efe1e6dae69237bfa14241a14f31..13c0ee31daf62ae33c240e4722aaefb16a0f4542 100644 (file)
@@ -2,4 +2,3 @@
 DEAL::OK
 DEAL::ExcDimensionMismatch((n),(size()))
 DEAL::ExcMessage ("No block is selected at all!")
-DEAL::ExcInternalError()
index 2a333727b664a930ce20e00da9e57982c521528a..f814f7a6775691cc3871de74e980816dfe8f7a1c 100644 (file)
@@ -39,7 +39,13 @@ void test ()
     Assert (m[i] == v[i], ExcInternalError());
 
                                   // this needs to throw an exception
-  m[v.size()];
+  try
+    {
+      m[v.size()];
+    }
+  catch (...)
+    {
+    }
 
   deallog << "OK" << std::endl;
 }
index 4328cd2635069a29a7a1a0958810fb027c1b6248..c95d4ffc921624eb3834f2c47cb6f919e607ae32 100644 (file)
@@ -44,8 +44,15 @@ void test ()
 
                                   // this now must throw an exception,
                                   // though:
-  Assert (ComponentMask(12,true).n_selected_components(13) == 12,
-         ExcInternalError());
+  try 
+    {
+      Assert (ComponentMask(12,true).n_selected_components(13) == 12,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
+  
 }
 
 
index d6c5311bbcf46434b25c61a7953d1feae62bee85..1d6e01e408481c8c1670a516f6dbe2a53ac057d3 100644 (file)
@@ -1,4 +1,3 @@
 
 DEAL::OK
 DEAL::ExcDimensionMismatch((n),(size()))
-DEAL::ExcDimensionMismatch((real_n),(component_mask.size()))
index bc9ae66041dfd1a5242fa2a2a3b30e0611b4d1ac..016638bb20c1d9e229052f3c2a049542debdca78 100644 (file)
@@ -45,11 +45,24 @@ void test ()
   deallog << "OK" << std::endl;
 
                                   // the following should yield an exception:
-  Assert (ComponentMask(12,true).first_selected_component(13) == 0,
-         ExcInternalError());
+  try 
+    {
+      Assert (ComponentMask(12,true).first_selected_component(13) == 0,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
+  
                                   // as should this:
-  Assert (ComponentMask(12,false).first_selected_component() == 0,
-         ExcInternalError());
+  try
+    {
+      Assert (ComponentMask(12,false).first_selected_component() == 0,
+             ExcInternalError());
+    }
+  catch (...)
+    {
+    }
 }
 
 
index 26c4dfbf8a02502bfebdec5219a91c1040203d41..7e586058745a58ea00a764abe89445afe075bc13 100644 (file)
@@ -2,4 +2,3 @@
 DEAL::OK
 DEAL::ExcDimensionMismatch((n),(size()))
 DEAL::ExcMessage ("No component is selected at all!")
-DEAL::ExcInternalError()
index 49e1259e1c74fa0c645a60bc03e3217c1f89b85c..a7fb80f3692f96f27fe32051908a1e5edd827a8c 100644 (file)
@@ -47,7 +47,13 @@ void test ()
                                     // now try to convert to a block
                                     // mask. this should not always
                                     // work
-    deallog << fe.block_mask (component_mask) << std::endl;
+    try
+      {
+       deallog << fe.block_mask (component_mask) << std::endl;
+      }
+    catch (...)
+      {
+      } 
   }
 
   deallog << "OK" << std::endl;
index 7d18a36dd57abe4fdc6360051ad314ba359d60e3..6144c6bab2d8a4dec85bfb7c77ebdbb9b661ce86 100644 (file)
@@ -1,34 +1,18 @@
 
 DEAL::[false,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,false]
 DEAL::[true,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,true]
-DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,true]
-DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,true]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,true]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,false]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,false]
 DEAL::[false,true]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[true,true]
 DEAL::ExcMessage ("The component mask argument given to this function " "is not a mask where the individual components belonging " "to one block of the finite element are either all " "selected or not selected. You can't call this function " "with a component mask that splits blocks.")
-DEAL::[false,true]
 DEAL::[true,true]
 DEAL::OK

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.