Changeset 420:0c0b44445f51

Show
Ignore:
Timestamp:
11/11/2012 02:07:26 PM (6 months ago)
Author:
Andreas Schaefer <gentryx@…>
Branch:
default
Message:

added obvious test, just to be sure

Location:
src/misc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/misc/region.h

    r362 r420  
    575575            buf << "indices[" << dim << "] = "  
    576576                << indices[dim] << "\n"; 
     577            std::cout << "  " << dim << " -> " << (indices[dim].begin() == indices[dim].end()) << "\n"; 
    577578        } 
    578579        buf << ")\n"; 
  • src/misc/test/unit/regiontest.h

    r367 r420  
    317317    } 
    318318 
     319    void testEmptyStreakIteration() 
     320    { 
     321        Region<2> region1; 
     322        Region<2> region2; 
     323        Region<2> region; 
     324  
     325        region1 << Streak<2>(Coord<2>(0, 0), 10); 
     326        region2 << Streak<2>(Coord<2>(0, 5), 10); 
     327        region = region1 & region2; 
     328 
     329        for (Region<2>::StreakIterator i = region.beginStreak(); 
     330             i != region.endStreak();  
     331             ++i) { 
     332            TS_FAIL("loop should not execute!"); 
     333        } 
     334    } 
     335 
    319336    void testUnorderedInsert() 
    320337    {