Failing_UnitTest.cpp

Go to the documentation of this file.
00001 #include "Teuchos_UnitTestHarness.hpp"
00002 
00003 
00004 namespace {
00005 
00006 
00007 TEUCHOS_UNIT_TEST( Int,  BadAssignment )
00008 {
00009   int i1 = 4;
00010   int i2 = i1 + 1;
00011   TEST_EQUALITY( i2, i1 );
00012 }
00013 
00014 
00015 TEUCHOS_UNIT_TEST( VectorInt, OutOfRangeAt )
00016 {
00017   const size_t n = 1;
00018   std::vector<int> v(n);
00019   const int i = v.at(n); // Should throw std::out_of_range!
00020   TEST_EQUALITY_CONST( i, 10 ); // Will never be executed!
00021 }
00022 
00023 
00024 } // namespace
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 09:57:28 2011 for Teuchos Package Browser (Single Doxygen Collection) by  doxygen 1.6.3