Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Array_UnitTests.cpp
Go to the documentation of this file.
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 //
00005 //                    Teuchos: Common Tools Package
00006 //                 Copyright (2004) Sandia Corporation
00007 //
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00039 //
00040 // ***********************************************************************
00041 // @HEADER
00042 */
00043 
00044 #include "Array_UnitTest_helpers.hpp"
00045 #include "Teuchos_Tuple.hpp"
00046 #include "Teuchos_ArrayRCP.hpp"
00047 
00048 
00049 namespace {
00050 
00051 
00052 using ArrayUnitTestHelpers::n;
00053 using ArrayUnitTestHelpers::generateArray;
00054 using Teuchos::null;
00055 using Teuchos::tuple;
00056 using Teuchos::RCP;
00057 using Teuchos::Array;
00058 using Teuchos::ArrayView;
00059 using Teuchos::ArrayRCP;
00060 using Teuchos::arcp;
00061 using Teuchos::arcpFromArray;
00062 using Teuchos::as;
00063 using Teuchos::getConst;
00064 using Teuchos::DanglingReferenceError;
00065 using Teuchos::fromStringToArray;
00066 using Teuchos::InvalidArrayStringRepresentation;
00067 
00068 
00069 TEUCHOS_UNIT_TEST( Array, TypeNameTraits )
00070 {
00071   TEST_EQUALITY(Teuchos::TypeNameTraits<Array<double> >::name(),
00072     std::string("Array(double)"));
00073 }
00074 
00075 
00076 TEUCHOS_UNIT_TEST( Array, stringToArray )
00077 {
00078 
00079   {
00080     std::string arrayString="{}";
00081     std::istringstream arrayStream(arrayString);
00082     Array<std::string> arrayVal = fromStringToArray<std::string>(arrayString);
00083     Array<std::string> arrayStreamVal;
00084     arrayStream >> arrayStreamVal;
00085     Array<std::string> arrayVal_exp;
00086     TEST_EQUALITY(arrayVal, arrayVal_exp);
00087     TEST_EQUALITY(arrayStreamVal, arrayVal_exp);
00088   }
00089 
00090   {
00091     std::string arrayString = "{ a, b, c, d }";
00092     std::istringstream arrayStream(arrayString);
00093     Array<std::string> arrayVal = fromStringToArray<std::string>(arrayString);
00094     Array<std::string> arrayStreamVal;
00095     arrayStream >> arrayStreamVal;
00096     Array<std::string> arrayVal_exp = Teuchos::tuple<std::string>("a", "b", "c", "d" );
00097     TEST_EQUALITY(arrayVal, arrayVal_exp);
00098     TEST_EQUALITY(arrayStreamVal, arrayVal_exp);
00099   }
00100 
00101   {
00102     std::string arrayString = "{ (a), b, c, (d) }";
00103     std::istringstream arrayStream(arrayString);
00104     Array<std::string> arrayVal = fromStringToArray<std::string>(arrayString);
00105     Array<std::string> arrayStreamVal;
00106     arrayStream >> arrayStreamVal;
00107     Array<std::string> arrayVal_exp = Teuchos::tuple<std::string>("(a)", "b", "c", "(d)" );
00108     TEST_EQUALITY(arrayVal, arrayVal_exp);
00109     TEST_EQUALITY(arrayStreamVal, arrayVal_exp);
00110   }
00111 
00112   {
00113     std::string arrayString = "{ (a ), b, c, (d ) }";
00114     std::istringstream arrayStream(arrayString);
00115     Array<std::string> arrayVal = fromStringToArray<std::string>(arrayString);
00116     Array<std::string> arrayStreamVal;
00117     arrayStream >> arrayStreamVal;
00118     Array<std::string> arrayVal_exp = Teuchos::tuple<std::string>("(a )", "b", "c", "(d )" );
00119     TEST_EQUALITY(arrayVal, arrayVal_exp);
00120     TEST_EQUALITY(arrayStreamVal, arrayVal_exp);
00121   }
00122 
00123   // This should work but does not.  I should fix this!
00124 //  {
00125 //    Array<std::string> arrayVal = fromStringToArray<std::string>("{ {a}, 'b', {c }, d }");
00126 //    Array<std::string> arrayVal_exp = Teuchos::tuple<std::string>("{a}", "'b'", "{c }", "d" );
00127 //    TEST_EQUALITY(arrayVal, arrayVal_exp);
00128 //  }
00129 
00130 }
00131 
00132 
00133 TEUCHOS_UNIT_TEST( Array, stringToArray_invalid )
00134 {
00135   TEST_THROW(fromStringToArray<std::string>("{ a, b, c"),
00136     InvalidArrayStringRepresentation);
00137   TEST_THROW(fromStringToArray<std::string>("a, b, c}"),
00138     InvalidArrayStringRepresentation);
00139   TEST_THROW(fromStringToArray<std::string>("a, b, c"),
00140     InvalidArrayStringRepresentation);
00141 }
00142 
00143 
00144 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, defaultConstruct, T )
00145 {
00146   Array<T> a2;
00147   TEST_EQUALITY_CONST( as<int>(a2.size()), 0 );
00148   TEST_EQUALITY_CONST( as<int>(a2.empty()), true );
00149   TEST_EQUALITY_CONST( a2.getRawPtr(), 0 );
00150   TEST_EQUALITY_CONST( getConst(a2).getRawPtr(), 0 );
00151 }
00152 
00153 
00154 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, sizedConstruct, T )
00155 {
00156   typedef typename Array<T>::size_type size_type;
00157   Array<T> a(n);
00158   TEST_EQUALITY_CONST( a.empty(), false );
00159   TEST_EQUALITY( a.length(), n );
00160   TEST_EQUALITY( as<int>(a.size()), n );
00161   TEST_EQUALITY( a.getRawPtr(), &a[0] );
00162   TEST_EQUALITY( getConst(a).getRawPtr(), &getConst(a)[0] );
00163   TEST_COMPARE( a.max_size(), >=, as<size_type>(n) );
00164   TEST_COMPARE( as<int>(a.capacity()), >=, n );
00165 }
00166 
00167 
00168 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, operatorBracket, T )
00169 {
00170   out << "\nTest that a[i] == i ... ";
00171   Array<T> a = generateArray<T>(n);
00172   bool local_success = true;
00173   for( int i = 0; i < n; ++i ) {
00174     TEST_ARRAY_ELE_EQUALITY( a, i, as<T>(i) );
00175   }
00176   if (local_success) out << "passed\n";
00177   else success = false;
00178 }
00179 
00180 
00181 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, constAt, T )
00182 {
00183   out << "\nTest that a.at(i) == i ...\n";
00184   Array<T> a = generateArray<T>(n);
00185   bool local_success = true;
00186   for( int i = 0; i < n; ++i ) {
00187     TEUCHOS_TEST_EQUALITY( a.at(i), as<T>(i), out, local_success );
00188   }
00189   if (local_success) out << "passed\n";
00190   else success = false;
00191 }
00192 
00193 
00194 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayViewIter_before_block_end, T )
00195 {
00196   typedef typename ArrayView<T>::iterator iter_t;
00197   typedef Teuchos::NullIteratorTraits<iter_t> NIT;
00198   iter_t iter = NIT::getNull();
00199   {
00200     ECHO(Array<T> a(n, as<T>(0)));
00201     ECHO(ArrayView<T> av = a);
00202     ECHO(iter = av.begin());
00203     ECHO(av = null);
00204     TEST_EQUALITY( *iter, a[0] );
00205     // Above, the iterator to the ArrayView object is still valid even through
00206     // the ArrayView object is was created from is gone now.  This is just
00207     // fine since the underlying data is still there in the original Array object.
00208     iter = NIT::getNull();
00209   }
00210 }
00211 
00212 
00213 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, RCPArray_to_ArrayRCP_null, T )
00214 {
00215   const RCP<Array<T> > a_rcp = null;
00216   const ArrayRCP<T> a_arcp = arcp(a_rcp);
00217   TEST_ASSERT( a_arcp == null );
00218 }
00219 
00220 
00221 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, RCPconstArray_to_ArrayRCP_null, T )
00222 {
00223   const RCP<const Array<T> > a_rcp = null;
00224   const ArrayRCP<const T> a_arcp = arcp(a_rcp);
00225   TEST_ASSERT( a_arcp == null );
00226 }
00227 
00228 
00229 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, RCPArray_to_ArrayRCP, T )
00230 {
00231   const Array<T> a_const = generateArray<T>(n);
00232   const RCP<Array<T> > a_rcp = Teuchos::rcp( new  Array<T>(a_const));
00233   const ArrayRCP<T> a_arcp = arcp(a_rcp);
00234   TEST_COMPARE_ARRAYS( a_const(), a_arcp() );
00235 }
00236 
00237 
00238 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, RCPconstArray_to_ArrayRCP, T )
00239 {
00240   const Array<T> a_const = generateArray<T>(n);
00241   const RCP<const Array<T> > a_rcp = Teuchos::rcp( new  Array<T>(a_const));
00242   const ArrayRCP<const T> a_arcp = arcp(a_rcp);
00243   TEST_COMPARE_ARRAYS( a_const(), a_arcp() );
00244 }
00245 
00246 
00247 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, Array_to_ArrayRCP_null, T )
00248 {
00249   Array<T> a;
00250   const ArrayRCP<T> a_arcp = arcpFromArray(a);
00251   TEST_ASSERT(a_arcp == null);
00252 }
00253 
00254 
00255 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, constArray_to_ArrayRCP_null, T )
00256 {
00257   const Array<T> a;
00258   const ArrayRCP<const T> a_arcp = arcpFromArray(a);
00259   TEST_ASSERT(a_arcp == null);
00260 }
00261 
00262 
00263 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, Array_to_ArrayRCP, T )
00264 {
00265   Array<T> a = generateArray<T>(n);
00266   const ArrayRCP<T> a_arcp = arcpFromArray(a);
00267   TEST_COMPARE_ARRAYS( a(), a_arcp() );
00268 }
00269 
00270 
00271 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, constArray_to_ArrayRCP, T )
00272 {
00273   const Array<T> a = generateArray<T>(n);
00274   const ArrayRCP<const T> a_arcp = arcpFromArray(a);
00275   TEST_COMPARE_ARRAYS( a(), a_arcp() );
00276 }
00277 
00278 
00279 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, Array_to_ArrayRCP_dangling, T )
00280 {
00281   ArrayRCP<T> a_arcp;
00282   {
00283     Array<T> a = generateArray<T>(n);
00284     a_arcp = arcpFromArray(a);
00285   }
00286 #ifdef TEUCHOS_DEBUG
00287   TEST_THROW(a_arcp[0], DanglingReferenceError);
00288 #endif
00289 }
00290 
00291 
00292 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, constArray_to_ArrayRCP_dangling, T )
00293 {
00294   ArrayRCP<const T> a_arcp;
00295   {
00296     const Array<T> a = generateArray<T>(n);
00297     a_arcp = arcpFromArray(a);
00298   }
00299 #ifdef TEUCHOS_DEBUG
00300   TEST_THROW(a_arcp[0], DanglingReferenceError);
00301 #endif
00302 }
00303 
00304 
00305 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, toVector, T )
00306 {
00307   const Array<T> a = generateArray<T>(n);
00308   const std::vector<T> v = a.toVector();
00309   TEST_COMPARE_ARRAYS( a, v );
00310 }
00311 
00312 
00313 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, toVector_empty, T )
00314 {
00315   const Array<T> a;
00316   const std::vector<T> v = a.toVector();
00317   TEST_EQUALITY_CONST( as<int>(v.size()), 0 );
00318 }
00319 
00320 
00321 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, view_empty_func, T )
00322 {
00323   Array<T> a;
00324   const ArrayView<T> av = a.view(0, 0);
00325   TEST_ASSERT(is_null(av));
00326 }
00327 
00328 
00329 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, view_empty_operator, T )
00330 {
00331   Array<T> a;
00332   const ArrayView<T> av = a(0, 0);
00333   TEST_ASSERT(is_null(av));
00334 }
00335 
00336 
00337 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, view_const_empty, T )
00338 {
00339   const Array<T> a;
00340   const ArrayView<const T> av = a.view(0, 0);
00341   TEST_ASSERT(is_null(av));
00342 }
00343 
00344 
00345 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, implicit_to_ArrayView_empty, T )
00346 {
00347   Array<T> a;
00348   const ArrayView<T> av = a();
00349   TEST_ASSERT(is_null(av));
00350 }
00351 
00352 
00353 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, implicit_to_ArrayView_const_empty, T )
00354 {
00355   const Array<T> a;
00356   const ArrayView<const T> av = a();
00357   TEST_ASSERT(is_null(av));
00358 }
00359 
00360 
00361 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_implicit, T )
00362 {
00363   ArrayView<T> av;
00364   { Array<T> a(n); av = a; }
00365 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00366   TEST_THROW( av[0] = 0, DanglingReferenceError );
00367 #endif
00368 }
00369 
00370 
00371 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_implicit_const, T )
00372 {
00373   ArrayView<const T> av;
00374   { Array<T> a(n); av = getConst(a); }
00375 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00376   TEST_THROW( av[0], DanglingReferenceError );
00377 #endif
00378 }
00379 
00380 
00381 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_explicit, T )
00382 {
00383   ArrayView<T> av;
00384   { Array<T> a(n); av = a(); }
00385 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00386   TEST_THROW( av[0] = 0, DanglingReferenceError );
00387 #endif
00388 }
00389 
00390 
00391 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_explicit_const, T )
00392 {
00393   ArrayView<const T> av;
00394   { Array<T> a(n); av = getConst(a)(); }
00395 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00396   TEST_THROW( av[0], DanglingReferenceError );
00397 #endif
00398 }
00399 
00400 
00401 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_subview, T )
00402 {
00403   ArrayView<T> av;
00404   { Array<T> a(n); av = a(0,1); }
00405 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00406   TEST_THROW( av[0] = 0, DanglingReferenceError );
00407 #endif
00408 }
00409 
00410 
00411 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayView_subview_const, T )
00412 {
00413   ArrayView<const T> av;
00414   { Array<T> a(n); av = getConst(a)(0,1); }
00415 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00416   TEST_THROW( av[0], DanglingReferenceError );
00417 #endif
00418 }
00419 
00420 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayViewIter, T )
00421 {
00422   typedef typename ArrayView<T>::iterator iter_t;
00423   ECHO(Array<T> a(n));
00424   ECHO(ArrayView<T> av = a);
00425   ECHO(iter_t iter = av.begin());
00426   ECHO(av = null);
00427   ECHO(a.resize(0));
00428 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00429   TEST_THROW( *iter = 0, DanglingReferenceError );
00430 #else
00431   (void)iter;
00432 #endif
00433 }
00434 
00435 
00436 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, danglingArrayViewIter_const, T )
00437 {
00438   typedef typename ArrayView<const T>::iterator iter_t;
00439   ECHO(Array<T> a(n));
00440   ECHO(ArrayView<T> av = a);
00441   ECHO(iter_t iter = av.begin());
00442   ECHO(av = null);
00443   ECHO(a.resize(0));
00444 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00445   TEST_THROW( *iter, DanglingReferenceError );
00446 #else
00447   (void)iter;
00448 #endif
00449 }
00450 
00451 
00452 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, structuralChangeArrayView, T )
00453 {
00454   Array<T> a = generateArray<T>(n);
00455   ArrayView<T> av = a;
00456   a.push_back(a[0]);
00457 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00458   TEST_THROW( av[0] = 0, DanglingReferenceError );
00459 #endif
00460 }
00461 
00462 
00463 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( Array, structuralChangeArrayView_const, T )
00464 {
00465   Array<T> a = generateArray<T>(n);
00466   ArrayView<const T> av = getConst(a);
00467   a.push_back(a[0]);
00468 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00469   TEST_THROW( av[0], DanglingReferenceError );
00470 #endif
00471 }
00472 
00473 
00474 //
00475 // Instantiations
00476 //
00477 
00478 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00479 
00480 #  define DEBUG_UNIT_TEST_GROUP( T )
00481 
00482 #else // HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00483 
00484 #  define DEBUG_UNIT_TEST_GROUP( T )
00485 
00486 #endif // HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
00487 
00488 
00489 #define UNIT_TEST_GROUP( T ) \
00490   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, defaultConstruct, T ) \
00491   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, sizedConstruct, T ) \
00492   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, operatorBracket, T ) \
00493   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, constAt, T ) \
00494   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayViewIter_before_block_end, T ) \
00495   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, RCPArray_to_ArrayRCP_null, T ) \
00496   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, RCPconstArray_to_ArrayRCP_null, T ) \
00497   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, RCPArray_to_ArrayRCP, T ) \
00498   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, RCPconstArray_to_ArrayRCP, T ) \
00499   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, Array_to_ArrayRCP_null, T ) \
00500   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, constArray_to_ArrayRCP_null, T ) \
00501   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, Array_to_ArrayRCP, T ) \
00502   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, constArray_to_ArrayRCP, T ) \
00503   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, Array_to_ArrayRCP_dangling, T ) \
00504   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, constArray_to_ArrayRCP_dangling, T ) \
00505   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, toVector, T ) \
00506   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, toVector_empty, T ) \
00507   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, view_empty_func, T ) \
00508   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, view_empty_operator, T ) \
00509   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, implicit_to_ArrayView_empty, T ) \
00510   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_implicit, T ) \
00511   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_implicit_const, T ) \
00512   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_explicit, T ) \
00513   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_explicit_const, T ) \
00514   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_subview, T ) \
00515   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayView_subview_const, T ) \
00516   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayViewIter, T ) \
00517   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, danglingArrayViewIter_const, T ) \
00518   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, structuralChangeArrayView, T ) \
00519   TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Array, structuralChangeArrayView_const, T ) \
00520   DEBUG_UNIT_TEST_GROUP( T )
00521 
00522 UNIT_TEST_GROUP(int)
00523 UNIT_TEST_GROUP(float)
00524 UNIT_TEST_GROUP(double)
00525 
00526 
00527 } // namespace
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines