Changeset 531 for library/tests

Show
Ignore:
Timestamp:
08/14/09 10:23:22 (15 years ago)
Author:
vbarta
Message:

more RV tests

Location:
library/tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/tests/mprod.cfg

    r529 r531  
    5656          class = "RV"; 
    5757          names = ( "mprodx" ); 
    58           sizes = ( "matrix", 1, 1, [ 2 ] ); 
     58          sizes = [ 2 ]; 
    5959        }; 
    6060      }; 
     
    7070          class = "RV"; 
    7171          names = ( "mprody" ); 
    72           sizes = ( "matrix", 1, 1, [ 2 ] ); 
     72          sizes = [ 2 ]; 
    7373        }; 
    7474      }; 
  • library/tests/rv_test.cpp

    r530 r531  
    1010 
    1111        RV a = RV ( "{a_in_test_rv }", "3" ); 
     12        CHECK ( a.equal ( a ) ); 
    1213        CHECK_EQUAL ( 1, a.length() ); 
    1314        CHECK_EQUAL ( 3, a.size ( 0 ) ); 
     
    1516 
    1617        RV b = RV ( "{b_in_test_rv }", "2" ); 
     18        CHECK ( !b.equal ( a ) ); 
    1719        CHECK_EQUAL ( 0, b.mint() ); 
    1820 
     
    9294        } 
    9395 
     96        // subselect 
     97        RV bc = abc ( ivec ( "1 2" ) ); 
     98        std::stringstream bcss; 
     99        bcss << bc; 
     100        CHECK_EQUAL ( std::string ( "2(2)=b_in_test_rv_{0}; 3(1)=c_in_test_rv_{0}; " ), bcss.str() ); 
     101 
     102#if 0 
     103        // actually doesn't select, just reorders the variables - 
     104        // wonder if that's correct... 
     105        bc = abc ( 1, 2 ); 
     106        bcss << bc; 
     107        CHECK_EQUAL ( std::string ( "2(2)=b_in_test_rv_{0}; 3(1)=c_in_test_rv_{0}; " ), bcss.str() ); 
     108#endif 
     109 
    94110        // Copy indices between ba and ab 
    95111        RV ba = b;