Index: Array/Test/ArrayTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Array/Test/ArrayTest.cpp,v retrieving revision 1.5 diff -c -p -r1.5 ArrayTest.cpp *** Array/Test/ArrayTest.cpp 1999/03/02 23:06:32 1.5 --- Array/Test/ArrayTest.cpp 2001/03/15 06:27:54 *************** int reportResults(int n, char *test, boo *** 19,33 **** { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! cout << " Test " << setw(3) << n << ", " ! << setw(42) << test << ": " << statusString << "\n"; return 0; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; ! cerr << what << endl; } //----------------------------------------------------------------------------- --- 19,33 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(42) << test << ": " << statusString << "\n"; return 0; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } //----------------------------------------------------------------------------- *************** int main( int argc, char *argv[] ) *** 74,106 **** // bool testStatus; try { ! cout << "IArray1B\n"; ! cout << "dimensions: " << IArray1B::dimensions << endl; ! cout << "rank: " << IArray1B::rank << endl; ! cout << "IArray7B\n"; ! cout << "dimensions: " << IArray7B::dimensions << endl; ! cout << "rank: " << IArray7B::rank << endl; ! cout << "ULArray7B\n"; ! cout << "dimensions: " << ULArray7B::dimensions << endl; ! cout << "rank: " << ULArray7B::rank << endl; ! cout << "CxArray7B\n"; ! cout << "dimensions: " << CxArray7B::dimensions << endl; ! cout << "rank: " << CxArray7B::rank << endl; ! cout << "IArray8B\n"; ! cout << "dimensions: " << IArray8B::dimensions << endl; ! cout << "rank: " << IArray8B::rank << endl; // // compile error: ! // cout << "IArrayNeg1\n"; ! // cout << "dimensions: " << IArrayNeg1::dimensions << endl; ! // cout << "rank: " << IArrayNeg1::rank << endl; IArray1B a(10); a = 0; a(0) = 1; IArray1B b = a; b(1) = 2; ! cout << "a: " << a << endl; ! cout << "b: " << b << endl; // // compile error: // IArrayNeg1 n1( 2 ); --- 74,106 ---- // bool testStatus; try { ! std::cout << "IArray1B\n"; ! std::cout << "dimensions: " << IArray1B::dimensions << std::endl; ! std::cout << "rank: " << IArray1B::rank << std::endl; ! std::cout << "IArray7B\n"; ! std::cout << "dimensions: " << IArray7B::dimensions << std::endl; ! std::cout << "rank: " << IArray7B::rank << std::endl; ! std::cout << "ULArray7B\n"; ! std::cout << "dimensions: " << ULArray7B::dimensions << std::endl; ! std::cout << "rank: " << ULArray7B::rank << std::endl; ! std::cout << "CxArray7B\n"; ! std::cout << "dimensions: " << CxArray7B::dimensions << std::endl; ! std::cout << "rank: " << CxArray7B::rank << std::endl; ! std::cout << "IArray8B\n"; ! std::cout << "dimensions: " << IArray8B::dimensions << std::endl; ! std::cout << "rank: " << IArray8B::rank << std::endl; // // compile error: ! // std::cout << "IArrayNeg1\n"; ! // std::cout << "dimensions: " << IArrayNeg1::dimensions << std::endl; ! // std::cout << "rank: " << IArrayNeg1::rank << std::endl; IArray1B a(10); a = 0; a(0) = 1; IArray1B b = a; b(1) = 2; ! std::cout << "a: " << a << std::endl; ! std::cout << "b: " << b << std::endl; // // compile error: // IArrayNeg1 n1( 2 ); *************** int main( int argc, char *argv[] ) *** 121,127 **** // CxArray7B cxd( 2,2,2,2,2,2,2 ); // cxd = (1.0, 0.0); // cxd( 0,0,0,0,0,0,1 ) = (3.14159, -0.5); ! // cout << "cxd\n" << cxd; } catch( const char *err ) --- 121,127 ---- // CxArray7B cxd( 2,2,2,2,2,2,2 ); // cxd = (1.0, 0.0); // cxd( 0,0,0,0,0,0,1 ) = (3.14159, -0.5); ! // std::cout << "cxd\n" << cxd; } catch( const char *err ) *************** int main( int argc, char *argv[] ) *** 129,137 **** catch( const Pooma::Assertion &err ) { uncaughtErrorReport( err.what(), nTest ); } catch( ... ) ! { cerr << "Unknown exception!" << endl; } ! cout << "\n" << endl; Pooma::finalize(); --- 129,137 ---- catch( const Pooma::Assertion &err ) { uncaughtErrorReport( err.what(), nTest ); } catch( ... ) ! { cerr << "Unknown exception!" << std::endl; } ! std::cout << "\n" << std::endl; Pooma::finalize(); Index: Domain/Loc/Characteristics/LocCharacteristics.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Loc/Characteristics/LocCharacteristics.cpp,v retrieving revision 1.9 diff -c -p -r1.9 LocCharacteristics.cpp *** Domain/Loc/Characteristics/LocCharacteristics.cpp 1999/03/09 17:04:55 1.9 --- Domain/Loc/Characteristics/LocCharacteristics.cpp 2001/03/15 06:27:55 *************** main(int argc, char *argv[]) { *** 133,139 **** cout << endl; ! Loc<1>a1 = 1; //Loc<1> b1(Loc<1>()); Loc<2> b2(a1,Loc<1>(2)); Loc<3> b3(b2,Loc<1>(3)); --- 133,139 ---- cout << endl; ! Loc<1> a1 = Loc<1>(1); //Loc<1> b1(Loc<1>()); Loc<2> b2(a1,Loc<1>(2)); Loc<3> b3(b2,Loc<1>(3)); Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/NewDomain/Constructors/NewDomainConstructor.cpp,v retrieving revision 1.5 diff -c -p -r1.5 NewDomainConstructor.cpp *** Domain/NewDomain/Constructors/NewDomainConstructor.cpp 1999/03/02 23:11:55 1.5 --- Domain/NewDomain/Constructors/NewDomainConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 16,35 **** { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! cout << " Test " << setw(3) << n << ", " ! << setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; ! cerr << what << endl; } template Interval<1> testElement(const T &dom, int no) { //get the nth element of dom, and store it in a separte variable ! T::OneDomain_t singleElem = dom[no]; return singleElem; } --- 16,35 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! cerr << what << std::endl; } template Interval<1> testElement(const T &dom, int no) { //get the nth element of dom, and store it in a separte variable ! typename T::OneDomain_t singleElem = dom[no]; return singleElem; } *************** main(int argc, char *argv[]) { *** 57,87 **** bool testStatus; if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on NewDomain object \n" ! << " ==============================================================\n" ! << endl; if (debug){ ! cout << "=========================DEBUG===================================" ! << endl; ! cout << endl; ! cout << "Starting domain test for Constructors on NewDomain object" ! << endl; ! cout << "A set of simple structs which tell how to combine." << endl; ! cout << endl; ! cout << " different Domain object together. TThey are named " << endl; ! cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " ! << endl; ! cout << "different domain types. If you have a domain as the last " ! << endl; ! cout << "argrment you must have a space between this argument and the" ! << endl; ! cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " ! << endl; } ! cout << endl; Loc<1> D1(1); Loc<1> D2(2); Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); --- 57,87 ---- bool testStatus; if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on NewDomain object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << "Starting domain test for Constructors on NewDomain object" ! << std::endl; ! std::cout << "A set of simple structs which tell how to combine." << std::endl; ! std::cout << std::endl; ! std::cout << " different Domain object together. TThey are named " << std::endl; ! std::cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " ! << std::endl; ! std::cout << "different domain types. If you have a domain as the last " ! << std::endl; ! std::cout << "argrment you must have a space between this argument and the" ! << std::endl; ! std::cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " ! << std::endl; } ! std::cout << std::endl; Loc<1> D1(1); Loc<1> D2(2); Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); *************** main(int argc, char *argv[]) { *** 92,224 **** NewDomain2,int>::Type_t newdomain2; NewDomain2,int>::Type_t newdomain2a = ! NewDomain2,int>::combine(D1,2); ! NewDomain3,Range<2>,int>::Type_t newdomain3; ! NewDomain3,Range<2>,int>::Type_t newdomain3a = ! NewDomain3,Range<2>,int>::combine(newdomain2a,R2,999); NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4; NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4a = ! NewDomain4,Interval<2>,Loc<1>,Loc<1> >::combine(R2,I2,D1,D2); NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5; NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5a = ! NewDomain5,Range<2>,int,Loc<4>,int>::combine ! (newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6; NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6a = ! NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::combine ! (newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> ! (newdomain2a,newdomain2a),999); NewDomain7,Range<2>,Loc<1>,Loc<1>,Interval<2>,Interval<2>, ! int>::Type_t newdomain7; NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>,Interval<2>, ! Range<2> >::Type_t newdomain7a = NewDomain7,Range<2>,Loc<1>, ! Loc<2>,Interval<2>,Interval<2>,Range<2> >::combine(R1,R2,D1,newdomain2a, ! I1,I2,R2); if (debug){ ! cout << "================================================================" ! << endl; ! cout << endl; ! cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << endl; ! cout << " R1 " << R1 << endl; ! cout << " R2 " << R2 << endl; ! cout << " D1 " << D1 << endl; ! cout << " newdomain2a " << newdomain2a << endl; ! cout << " I1 " << I1 << endl; ! cout << " I2 " << I2 << endl; ! cout << " newdomain2 " << newdomain2 << endl; ! cout << " newdomain2a " << newdomain2a << endl; ! cout << " newdomain3 " << newdomain3 << endl; ! cout << " newdomain3a " << newdomain3a << endl; ! cout << " newdomain4 " << newdomain4 << endl; ! cout << " newdomain4a " << newdomain4a << endl; ! cout << " newdomain5 " << newdomain5 << endl; ! cout << " newdomain5a \n" << " " << newdomain5a << endl; ! cout << " newdomain6 \n " << " " << newdomain6 << endl; ! cout << " newdomain6a \n " << " " << newdomain6a << endl; ! cout << " newdomain7 \n " << " " << newdomain7 << endl; ! cout << " newdomain7a \n " << " " << newdomain7a << endl; ! cout << " newdomain2.dimensions " << newdomain2.dimensions << endl; ! cout << " newdomain3.dimensions " << newdomain3.dimensions << endl; ! cout << " newdomain4.dimensions " << newdomain4.dimensions << endl; ! cout << " newdomain5.dimensions " << newdomain5.dimensions << endl; ! cout << " newdomain6.dimensions " << newdomain6.dimensions << endl; ! cout << " newdomain7.dimensions " << newdomain7.dimensions << endl; ! cout << " newdomain2a.dimensions " << newdomain2a.dimensions << endl; ! cout << " newdomain3a.dimensions " << newdomain3a.dimensions << endl; ! cout << " newdomain4a.dimensions " << newdomain4a.dimensions << endl; ! cout << " newdomain5a.dimensions " << newdomain5a.dimensions << endl; ! cout << " newdomain6a.dimensions " << newdomain6a.dimensions << endl; ! cout << " newdomain7a.dimensions " << newdomain7a.dimensions << endl; ! cout << endl; ! cout << "================================================================" << endl; } ! cout << "Testing NewDomain<*> constructors methods:" << endl; ! cout << "----------------------------------------------------------" << endl; ! try { ! //---------------------------------------------------------------------- ! // Test NewDomain Construtor ! //---------------------------------------------------------------------- ! ! testStatus = (newdomain2.dimensions == 2); ! testStatus = (newdomain3.dimensions == 5) && testStatus; ! testStatus = (newdomain4.dimensions == 6) && testStatus; ! testStatus = (newdomain5.dimensions == 10) && testStatus; ! testStatus = (newdomain6.dimensions == 14) && testStatus; ! testStatus = (newdomain7.dimensions == 11) && testStatus; ! testStatus = (newdomain7a.dimensions == 13) && testStatus; ! reportResults(testNumber++,"Empty Construtor ",testStatus); ! ! //---------------------------------------------------------------------- ! // Test Combine Construtor ! //---------------------------------------------------------------------- ! testStatus = (newdomain2a[1] == 2 ); ! testStatus = (newdomain3a[2] == R2[0]) && testStatus; ! testStatus = (newdomain4a[5] == Loc<1>(2)) && testStatus ; ! testStatus = (newdomain5a[4] == Loc<1>(999))&& testStatus ; ! testStatus = (newdomain6a[12] == D2) && testStatus; ! //testStatus = (newdomain7a[11] == Range<1>(-100,100,20)) && testStatus; ! reportResults(testNumber++,"Combine Construtor ",testStatus); ! ! //---------------------------------------------------------------------- ! // Test Fill Construtor ! //---------------------------------------------------------------------- ! NewDomain2,int>::fill(newdomain2,D1,2); ! testStatus = (newdomain2a ==newdomain2 ); ! NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::fill ! ( newdomain6,newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> ! (newdomain2a,newdomain2a),999); ! testStatus = (newdomain6a ==newdomain6 ) && testStatus; ! NewDomain5,Range<2>,int,Loc<4>,int>::fill( ! newdomain5,newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); ! testStatus = (newdomain5a == newdomain5) && testStatus ; ! reportResults(testNumber++,"Fill Construtor ",testStatus); ! } // end try ! ! catch (const char *err) ! { uncaughtErrorReport(err,testNumber); } ! catch(const Pooma::Assertion &err) ! {uncaughtErrorReport(err.what(),testNumber); } ! catch(...) ! { cerr << "Unknow exception!" << endl; } ! cout << endl; ! } - - - - - - - - --- 92,215 ---- NewDomain2,int>::Type_t newdomain2; NewDomain2,int>::Type_t newdomain2a = ! NewDomain2,int>::combine(D1,2); ! NewDomain3,Range<2>,int>::Type_t newdomain3; ! NewDomain3,Range<2>,int>::Type_t newdomain3a = ! NewDomain3,Range<2>,int>::combine(newdomain2a,R2,999); NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4; NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4a = ! NewDomain4,Interval<2>,Loc<1>,Loc<1> >::combine(R2,I2,D1,D2); NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5; NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5a = ! NewDomain5,Range<2>,int,Loc<4>,int>::combine ! (newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6; NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6a = ! NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::combine ! (newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> ! (newdomain2a,newdomain2a),999); NewDomain7,Range<2>,Loc<1>,Loc<1>,Interval<2>,Interval<2>, ! int>::Type_t newdomain7; NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>,Interval<2>, ! Range<2> >::Type_t newdomain7a = NewDomain7,Range<2>,Loc<1>, ! Loc<2>,Interval<2>,Interval<2>,Range<2> >::combine(R1,R2,D1,newdomain2a, ! I1,I2,R2); if (debug){ ! std::cout << "================================================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << std::endl; ! std::cout << " R1 " << R1 << std::endl; ! std::cout << " R2 " << R2 << std::endl; ! std::cout << " D1 " << D1 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " I1 " << I1 << std::endl; ! std::cout << " I2 " << I2 << std::endl; ! std::cout << " newdomain2 " << newdomain2 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " newdomain3 " << newdomain3 << std::endl; ! std::cout << " newdomain3a " << newdomain3a << std::endl; ! std::cout << " newdomain4 " << newdomain4 << std::endl; ! std::cout << " newdomain4a " << newdomain4a << std::endl; ! std::cout << " newdomain5 " << newdomain5 << std::endl; ! std::cout << " newdomain5a \n" << " " << newdomain5a << std::endl; ! std::cout << " newdomain6 \n " << " " << newdomain6 << std::endl; ! std::cout << " newdomain6a \n " << " " << newdomain6a << std::endl; ! std::cout << " newdomain7 \n " << " " << newdomain7 << std::endl; ! std::cout << " newdomain7a \n " << " " << newdomain7a << std::endl; ! std::cout << " newdomain2.dimensions " << newdomain2.dimensions << std::endl; ! std::cout << " newdomain3.dimensions " << newdomain3.dimensions << std::endl; ! std::cout << " newdomain4.dimensions " << newdomain4.dimensions << std::endl; ! std::cout << " newdomain5.dimensions " << newdomain5.dimensions << std::endl; ! std::cout << " newdomain6.dimensions " << newdomain6.dimensions << std::endl; ! std::cout << " newdomain7.dimensions " << newdomain7.dimensions << std::endl; ! std::cout << " newdomain2a.dimensions " << newdomain2a.dimensions << std::endl; ! std::cout << " newdomain3a.dimensions " << newdomain3a.dimensions << std::endl; ! std::cout << " newdomain4a.dimensions " << newdomain4a.dimensions << std::endl; ! std::cout << " newdomain5a.dimensions " << newdomain5a.dimensions << std::endl; ! std::cout << " newdomain6a.dimensions " << newdomain6a.dimensions << std::endl; ! std::cout << " newdomain7a.dimensions " << newdomain7a.dimensions << std::endl; ! std::cout << std::endl; ! std::cout << "================================================================" << std::endl; } ! std::cout << "Testing NewDomain<*> constructors methods:" << std::endl; ! std::cout << "----------------------------------------------------------" << std::endl; ! try { ! //---------------------------------------------------------------------- ! // Test NewDomain Construtor ! //---------------------------------------------------------------------- ! ! testStatus = (newdomain2.dimensions == 2); ! testStatus = (newdomain3.dimensions == 5) && testStatus; ! testStatus = (newdomain4.dimensions == 6) && testStatus; ! testStatus = (newdomain5.dimensions == 10) && testStatus; ! testStatus = (newdomain6.dimensions == 14) && testStatus; ! testStatus = (newdomain7.dimensions == 11) && testStatus; ! testStatus = (newdomain7a.dimensions == 13) && testStatus; ! reportResults(testNumber++,"Empty Construtor ",testStatus); ! ! //---------------------------------------------------------------------- ! // Test Combine Construtor ! //---------------------------------------------------------------------- ! testStatus = (newdomain2a[1] == 2 ); ! testStatus = (newdomain3a[2] == R2[0]) && testStatus; ! testStatus = (newdomain4a[5] == Loc<1>(2)) && testStatus ; ! testStatus = (newdomain5a[4] == Loc<1>(999))&& testStatus ; ! testStatus = (newdomain6a[12] == D2) && testStatus; ! //testStatus = (newdomain7a[11] == Range<1>(-100,100,20)) && testStatus; ! reportResults(testNumber++,"Combine Construtor ",testStatus); ! ! //---------------------------------------------------------------------- ! // Test Fill Construtor ! //---------------------------------------------------------------------- ! NewDomain2,int>::fill(newdomain2,D1,2); ! testStatus = (newdomain2a ==newdomain2 ); ! NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::fill ! ( newdomain6,newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> ! (newdomain2a,newdomain2a),999); ! testStatus = (newdomain6a ==newdomain6 ) && testStatus; ! NewDomain5,Range<2>,int,Loc<4>,int>::fill( ! newdomain5,newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); ! testStatus = (newdomain5a == newdomain5) && testStatus ; ! reportResults(testNumber++,"Fill Construtor ",testStatus); ! } // end try ! ! catch (const char *err) ! { uncaughtErrorReport(err,testNumber); } ! catch(const Pooma::Assertion &err) ! {uncaughtErrorReport(err.what(),testNumber); } ! catch(...) ! { cerr << "Unknow exception!" << std::endl; } ! std::cout << std::endl; } Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/RangeConstructor.cpp,v retrieving revision 1.6 diff -c -p -r1.6 RangeConstructor.cpp *** Domain/Range/Constructors/RangeConstructor.cpp 1999/03/02 23:12:23 1.6 --- Domain/Range/Constructors/RangeConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 18,31 **** { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! cout << " Test " << setw(3) << n << ", " ! << setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; ! cerr << what << endl; } --- 18,31 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } *************** main(int argc, char *argv[]) { *** 40,67 **** if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on Range object \n" ! << " ==============================================================\n" ! << endl; if (debug){ ! cout << "=========================DEBUG===================================" ! << endl; ! cout << "Range represents a sequence of integers [a,a+s,... b], with " ! << endl; ! cout << "endpoints a and b, and stride s. Each dimension is independent" ! << endl; ! cout << "of the other. The endpoints may be positive or negative." << endl; ! cout << endl; ! cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << endl; ! cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << endl; ! cout << "value will not be intitalized to 0 but will have ramdom junk. I" ! << endl; ! cout << "have not come up with a way to do a pass/fail on the feature." ! << endl; ! cout << "Float and Double values are truncated." << endl; } Range<1> a1(1); --- 40,67 ---- if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on Range object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << "Range represents a sequence of integers [a,a+s,... b], with " ! << std::endl; ! std::cout << "endpoints a and b, and stride s. Each dimension is independent" ! << std::endl; ! std::cout << "of the other. The endpoints may be positive or negative." << std::endl; ! std::cout << std::endl; ! std::cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << std::endl; ! std::cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << std::endl; ! std::cout << "value will not be intitalized to 0 but will have ramdom junk. I" ! << std::endl; ! std::cout << "have not come up with a way to do a pass/fail on the feature." ! << std::endl; ! std::cout << "Float and Double values are truncated." << std::endl; } Range<1> a1(1); *************** main(int argc, char *argv[]) { *** 82,102 **** if (debug){ ! cout << "Range<1> Length Constructor for test."<< endl; ! cout << " 1D default Range<1> a1(1) " << a1 << endl; ! cout << " 1D default Range<1> a2(-3) " << a2 << endl; ! cout << " 1D default Range<1> a3(3) " << a3 << endl; ! cout << " 1D default Range<1> a4(4) " << a4 << endl; ! cout << " 1D default Range<1> a5(-5) " << a5 << endl; ! cout << " 1D default Range<1> a6(6) " << a6 << endl; ! cout << " 1D default Range<1> a1i(1) " << a1i << endl; ! cout << " 1D default Range<1> a1ia(1,5) " << a1ia << endl; ! cout << " 1D default Range<1> a1ib(0,5) " << a1ib << endl; ! cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << endl; ! cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << endl; ! cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << endl; ! cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << endl; ! cout << endl; } Range<1> n1(-100); --- 82,102 ---- if (debug){ ! std::cout << "Range<1> Length Constructor for test."<< std::endl; ! std::cout << " 1D default Range<1> a1(1) " << a1 << std::endl; ! std::cout << " 1D default Range<1> a2(-3) " << a2 << std::endl; ! std::cout << " 1D default Range<1> a3(3) " << a3 << std::endl; ! std::cout << " 1D default Range<1> a4(4) " << a4 << std::endl; ! std::cout << " 1D default Range<1> a5(-5) " << a5 << std::endl; ! std::cout << " 1D default Range<1> a6(6) " << a6 << std::endl; ! std::cout << " 1D default Range<1> a1i(1) " << a1i << std::endl; ! std::cout << " 1D default Range<1> a1ia(1,5) " << a1ia << std::endl; ! std::cout << " 1D default Range<1> a1ib(0,5) " << a1ib << std::endl; ! std::cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << std::endl; ! std::cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << std::endl; ! std::cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << std::endl; ! std::cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << std::endl; ! std::cout << std::endl; } Range<1> n1(-100); *************** main(int argc, char *argv[]) { *** 136,177 **** Range<6> FDR6(DI3,NI1a, DI2); if (debug){ ! cout << " 1D default Range<1> b1(a1if) " << b1 << endl; ! cout << " 2D default Range<2> b2(b1,a1) " << b2 << endl; ! cout << " 3D default Range<3> b3(b2,a3) " << b3 << endl; ! cout << " 4D default Range<4> b4(b3,a4) " << endl; ! cout << " " << b4 << endl; ! cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << endl; ! cout << " " << b5 << endl; ! cout << " 6D default Range<6> b6(b5,a6) " << endl; ! cout << " " << b6 << endl; ! cout << " 1D Negative Range<1> n1(-100) " << n1 << endl; ! cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << endl; ! cout << " Range<1>(100,-100,10)) " << n2 << endl; ! cout << " 3D Negative Range<3> n3(n2,a1) " << endl; ! cout << " " << n3 << endl; ! ! cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << endl; ! cout << " " << RL2 << endl; ! cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << endl; ! cout << " " << RL3 << endl; ! cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << endl; ! cout << " " << RL4 << endl; ! cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << endl; ! cout << " " << RL5 << endl; ! cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< endl; ! cout << " " << NRL2 << endl; ! cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << endl; ! cout << " " << NRL3 << endl; ! cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " ! << endl; ! cout << " " << NRL5 << endl; ! cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " ! << endl; ! cout << " " << FDR6 << endl; ! cout << "=========================END DEBUG============================" ! << endl; ! cout << endl; } try { testStatus = (a3 == Range<1>(3)); --- 136,177 ---- Range<6> FDR6(DI3,NI1a, DI2); if (debug){ ! std::cout << " 1D default Range<1> b1(a1if) " << b1 << std::endl; ! std::cout << " 2D default Range<2> b2(b1,a1) " << b2 << std::endl; ! std::cout << " 3D default Range<3> b3(b2,a3) " << b3 << std::endl; ! std::cout << " 4D default Range<4> b4(b3,a4) " << std::endl; ! std::cout << " " << b4 << std::endl; ! std::cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << std::endl; ! std::cout << " " << b5 << std::endl; ! std::cout << " 6D default Range<6> b6(b5,a6) " << std::endl; ! std::cout << " " << b6 << std::endl; ! std::cout << " 1D Negative Range<1> n1(-100) " << n1 << std::endl; ! std::cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << std::endl; ! std::cout << " Range<1>(100,-100,10)) " << n2 << std::endl; ! std::cout << " 3D Negative Range<3> n3(n2,a1) " << std::endl; ! std::cout << " " << n3 << std::endl; ! ! std::cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << std::endl; ! std::cout << " " << RL2 << std::endl; ! std::cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << std::endl; ! std::cout << " " << RL3 << std::endl; ! std::cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << std::endl; ! std::cout << " " << RL4 << std::endl; ! std::cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << std::endl; ! std::cout << " " << RL5 << std::endl; ! std::cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< std::endl; ! std::cout << " " << NRL2 << std::endl; ! std::cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << std::endl; ! std::cout << " " << NRL3 << std::endl; ! std::cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " ! << std::endl; ! std::cout << " " << NRL5 << std::endl; ! std::cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " ! << std::endl; ! std::cout << " " << FDR6 << std::endl; ! std::cout << "=========================END DEBUG============================" ! << std::endl; ! std::cout << std::endl; } try { testStatus = (a3 == Range<1>(3)); *************** main(int argc, char *argv[]) { *** 209,216 **** catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { cerr << "Unknown exception!" << endl; } ! cout << endl; Pooma::finalize(); } --- 209,216 ---- catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { std::cerr << "Unknown exception!" << std::endl; } ! std::cout << std::endl; Pooma::finalize(); } Index: Domain/Range/Constructors/makefile =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/makefile,v retrieving revision 1.2 diff -c -p -r1.2 makefile *** Domain/Range/Constructors/makefile 1998/10/25 00:08:47 1.2 --- Domain/Range/Constructors/makefile 2001/03/15 06:27:55 *************** include $(PROJECT_ROOT)/config/head.mk *** 6,11 **** default:: $(ODIR)/RangeConstructor ! $(ODIR)/LocOperations: $(ODIR)/RangeOperations.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk --- 6,11 ---- default:: $(ODIR)/RangeConstructor ! $(ODIR)/RangeConstructor: $(ODIR)/RangeConstructor.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk Index: Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp,v retrieving revision 1.18 diff -c -p -r1.18 BrickEngineTest.cpp *** Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 1999/03/25 19:03:21 1.18 --- Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 2001/03/15 06:27:56 *************** main(int argc, char* argv[]) { *** 269,275 **** ++testNumber; { ! typedef Engine3Df_t::BaseDomain_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } --- 269,275 ---- ++testNumber; { ! typedef Engine3Df_t::Base_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } Index: Shared/dclock.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Shared/dclock.cpp,v retrieving revision 1.1 diff -c -p -r1.1 dclock.cpp *** Shared/dclock.cpp 1998/10/29 17:29:57 1.1 --- Shared/dclock.cpp 2001/03/15 06:27:56 *************** *** 5,10 **** --- 5,12 ---- //----------------------------------------------------------------------------- #include + #include + #include extern "C" { *************** void dclock_init() *** 15,23 **** double dclock() { ! struct timespec ts; ! clock_gettime(CLOCK_SGI_CYCLE,&ts); ! return ts.tv_sec + 1e-9*ts.tv_nsec; } }; --- 17,27 ---- double dclock() { ! struct tms ts; ! clock_t answer = times(&ts); ! if (answer == static_cast(-1)) ! abort(); ! return static_cast(answer) / CLOCKS_PER_SEC; } }; Index: Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp,v retrieving revision 1.12 diff -c -p -r1.12 RefCountedBlockPtrTest.cpp *** Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp 1999/03/02 23:15:47 1.12 --- Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp 2001/03/15 06:27:56 *************** main(int argc, char* argv[]) { *** 363,370 **** fptrT_t fp2(fp1+4,16); float fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += abs(fp2[i] - fp1[i+4]); ! int itrunc1 = fp2[4]; testStatus = (fdiff == zero) && (itrunc1 == 108) && testStatus; testStatus = fp2.isValid() && !fp2.isShared(); --- 363,370 ---- fptrT_t fp2(fp1+4,16); float fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += fabs(fp2[i] - fp1[i+4]); ! int itrunc1 = static_cast(fp2[4]); testStatus = (fdiff == zero) && (itrunc1 == 108) && testStatus; testStatus = fp2.isValid() && !fp2.isShared(); *************** main(int argc, char* argv[]) { *** 380,386 **** ++testNumber; try { ! itrunc1 = fp2[30]; throw reportResults(testNumber,"constructor; user-allocated pointer, II", false); } --- 380,386 ---- ++testNumber; try { ! itrunc1 = static_cast(fp2[30]); throw reportResults(testNumber,"constructor; user-allocated pointer, II", false); } *************** main(int argc, char* argv[]) { *** 400,406 **** testStatus = fp4.isValid() && fp4.isShared() && testStatus; fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += abs(fp2[i] - fp3[i]); testStatus = (fdiff == zero) && testStatus; testStatus = (fp4 == fp2) && testStatus; reportResults(testNumber,"assignment functions (both BC polarities)", --- 400,406 ---- testStatus = fp4.isValid() && fp4.isShared() && testStatus; fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += fabs(fp2[i] - fp3[i]); testStatus = (fdiff == zero) && testStatus; testStatus = (fp4 == fp2) && testStatus; reportResults(testNumber,"assignment functions (both BC polarities)", *************** main(int argc, char* argv[]) { *** 440,453 **** testStatus); ! //---------------------------------------------------- ! // test 16: pointers, II: begin(), end(), isInBounds() ! //---------------------------------------------------- ++testNumber; // test pointer arithmetic operators +=, -=, +, - and ! // functions begin(), end(), isInBounds() iptrT_t ip13(19,0); testStatus = (ip13 == ip13.begin()); --- 440,453 ---- testStatus); ! //-------------------------------------- ! // test 16: pointers, II: begin(), end() ! //-------------------------------------- ++testNumber; // test pointer arithmetic operators +=, -=, +, - and ! // functions begin(), end() iptrT_t ip13(19,0); testStatus = (ip13 == ip13.begin()); *************** main(int argc, char* argv[]) { *** 457,466 **** ip13 += 3; } - testStatus = ip13.isInBounds() && testStatus; testStatus = ((ip13+1) == ip13.end()) && testStatus; ip13 += 1; - testStatus = !ip13.isInBounds() && testStatus; // ip13 is now past end of block; need to reset to beginning for // correct operator [] access. Note, however, that operator [] --- 457,464 ---- *************** main(int argc, char* argv[]) { *** 476,484 **** ip13 -= 10; testStatus = (*ip13 == 3) && testStatus; ip13 -= 30; - testStatus = !ip13.isInBounds() && testStatus; ! reportResults(testNumber,"pointers, II: begin(), end(), isInBounds()", testStatus); --- 474,481 ---- ip13 -= 10; testStatus = (*ip13 == 3) && testStatus; ip13 -= 30; ! reportResults(testNumber,"pointers, II: begin(), end()", testStatus);