From 2da4e44a372a9afa458fc498eb724d52e0d6d8b9 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Sun, 8 May 2005 16:50:14 +0000 Subject: [PATCH] Unified test operator() and operator(int) svn path=/trunk/boost/libs/numeric/ublas/; revision=28740 --- test/test4/test43.cpp | 27 +-------------------------- test/test5/test53.cpp | 15 +-------------- test/test6/test63.cpp | 15 +-------------- 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/test/test4/test43.cpp b/test/test4/test43.cpp index 2549be8c..1aa35a76 100644 --- a/test/test4/test43.cpp +++ b/test/test4/test43.cpp @@ -126,8 +126,7 @@ struct test_my_matrix { test_with (ms1, ms2, ms3); #endif } - } - void operator () (int) const { + #ifdef USE_ADAPTOR { #ifdef USE_BANDED @@ -183,26 +182,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #endif #endif @@ -211,26 +206,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #endif #endif @@ -239,26 +230,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::row_major, std::vector > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::row_major, std::vector > >, 3 > () (0); #endif #endif #endif @@ -269,26 +256,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #endif #endif @@ -297,26 +280,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #endif #endif @@ -325,26 +304,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::row_major, std::vector > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::row_major, std::vector > >, 3 > () (0); #endif #endif #endif diff --git a/test/test5/test53.cpp b/test/test5/test53.cpp index d847d0a8..6a34445c 100644 --- a/test/test5/test53.cpp +++ b/test/test5/test53.cpp @@ -121,8 +121,7 @@ struct test_my_matrix { test_with (ms1, ms2, ms3); #endif } - } - void operator () (int) const { + #ifdef USE_ADAPTOR { M m1 (N, N), m2 (N, N), m3 (N, N); @@ -155,26 +154,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #endif #endif @@ -183,26 +178,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #endif #endif @@ -211,26 +202,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (0); #endif #endif #endif diff --git a/test/test6/test63.cpp b/test/test6/test63.cpp index 5299a919..ad97ce31 100644 --- a/test/test6/test63.cpp +++ b/test/test6/test63.cpp @@ -121,8 +121,7 @@ struct test_my_matrix { test_with (ms1, ms2, ms3); #endif } - } - void operator () (int) const { + #ifdef USE_ADAPTOR { M m1 (N, N), m2 (N, N), m3 (N, N); @@ -155,26 +154,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, bounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, bounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::bounded_array, 3 * 3> >, 3 > () (0); #endif #endif #endif @@ -183,26 +178,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, unbounded_array" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, unbounded_array" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, ublas::unbounded_array > >, 3 > () (0); #endif #endif #endif @@ -211,26 +202,22 @@ void test_matrix () { #ifdef USE_FLOAT std::cout << "float, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "double, std::vector" << std::endl; test_my_matrix >, 3 > () (); - test_my_matrix >, 3 > () (0); #endif #ifdef USE_STD_COMPLEX #ifdef USE_FLOAT std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (0); #endif #ifdef USE_DOUBLE std::cout << "std::complex, std::vector" << std::endl; test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (); - test_my_matrix, ublas::lower, ublas::row_major, std::vector > >, 3 > () (0); #endif #endif #endif