Array_UnitTest_helpers.hpp

Go to the documentation of this file.
00001 #include "Teuchos_UnitTestHarness.hpp"
00002 #include "Teuchos_Array.hpp"
00003 #include "Teuchos_getConst.hpp"
00004 #include "Teuchos_as.hpp"
00005 
00006 
00007 namespace ArrayUnitTestHelpers {
00008 
00009 
00010 extern int n;
00011 
00012 
00013 template<class T>
00014 Teuchos::Array<T> generateArray(const int n_in)
00015 {
00016   using Teuchos::as;
00017   Teuchos::Array<T> a(n_in);
00018   for( int i = 0; i < n_in; ++i )
00019     a[i] = as<T>(i); // tests non-const operator[](i)
00020   return a;
00021 }
00022 
00023 
00024 } // namespace ArrayUnitTestHelpers
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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