TemplateFunc_UnitTests.cpp

Go to the documentation of this file.
00001 #include "Teuchos_UnitTestHarness.hpp"
00002 #include "Teuchos_as.hpp"
00003 
00004 
00005 template<class T>
00006 T someFunc( const T &t )
00007 {
00008   return t*t;
00009 }
00010 
00011 
00012 namespace {
00013 
00014 
00015 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( someFunc, test1, T )
00016 {
00017   using Teuchos::as;
00018   T t1 = 5;
00019   TEST_EQUALITY_CONST( t1, as<T>(5) );
00020 }
00021 
00022 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_SCALAR_TYPES( someFunc, test1)
00023 
00024 
00025 } // namespace
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Oct 20 10:13:59 2009 for Teuchos Package Browser (Single Doxygen Collection) by  doxygen 1.6.1