Show
Ignore:
Timestamp:
08/27/09 15:39:33 (15 years ago)
Author:
smidl
Message:

new function unique(ivec) and its test in RV_test

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/rv_test.cpp

    r531 r584  
    133133                CHECK_EQUAL ( exp_bi[i], bi ( i ) ); 
    134134        } 
     135         
     136        // check uniqueness 
     137        RV join=a; 
     138        join.add(b); 
     139        RV tmp=a; tmp.t(1); 
     140        join.add(tmp); 
     141        tmp=b; tmp.t(-1); 
     142        join.add(tmp); 
     143         
     144        CHECK_EQUAL(unique(join._ids()), vec_2(a.id(0), b.id(0))); 
    135145}