From 417ac7712b2c9bec5a462fdccd62005bcdfe8b48 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 2 Sep 2004 11:46:31 +0000 Subject: [PATCH] test the value of default construction. Either empty or full size (bounded_array) [SVN r24865] --- test1/test11.cpp | 10 ++++++++++ test1/test13.cpp | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/test1/test11.cpp b/test1/test11.cpp index 9b3f23a8..f3e5e0c3 100644 --- a/test1/test11.cpp +++ b/test1/test11.cpp @@ -37,6 +37,10 @@ struct test_my_vector { size_type i; real_type n; + // Default Construct + VP default_constuct; + std::cout << "default construct = " << default_constuct << std::endl; + // Copy and swap initialize_vector (v1); initialize_vector (v2); @@ -112,6 +116,12 @@ struct test_my_vector { initialize_vector (v2); t = ublas::inner_prod (v1, v2); std::cout << "inner_prod (v1, v2) = " << t << std::endl; + + // Scalar and Binary vector expression resulting in a vector + initialize_vector (v1); + initialize_vector (v2); + v1 = v1 * ublas::inner_prod (v1, v2); + std::cout << "v1 * inner_prod (v1, v2) = " << v1 << std::endl; } } void operator () () const { diff --git a/test1/test13.cpp b/test1/test13.cpp index f0893bb9..0eb5d637 100644 --- a/test1/test13.cpp +++ b/test1/test13.cpp @@ -33,6 +33,10 @@ struct test_my_matrix { { value_type t; + // Default Construct + MP default_constuct; + std::cout << "default construct = " << default_constuct << std::endl; + // Copy and swap initialize_matrix (m1); initialize_matrix (m2);