Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91201507
range_iterator.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 8, 22:27
Size
567 B
Mime Type
text/x-c
Expires
Sun, Nov 10, 22:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22218763
Attached To
rSPECMICP SpecMiCP / ReactMiCP
range_iterator.cpp
View Options
#include "catch.hpp"
#include "utils/range_iterator.hpp"
TEST_CASE("RangeIterator", "[iterator],[types]") {
SECTION("Simple test") {
int current = 0;
auto range = specmicp::RangeIterator<int>(0, 6);
for (auto it=range.begin(); it!=range.end(); ++it) {
CHECK(*it == current);
++current;
}
CHECK(current == 6);
current = 0;
for (auto val: specmicp::RangeIterator<int>(0, 6)) {
CHECK(val == current);
++current;
}
CHECK(current == 6);
}
}
Event Timeline
Log In to Comment