Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67366322
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
Sat, Jun 22, 01:00
Size
577 B
Mime Type
text/x-c
Expires
Mon, Jun 24, 01:00 (2 d)
Engine
blob
Format
Raw Data
Handle
18363620
Attached To
rSPECMICP SpecMiCP / ReactMiCP
range_iterator.cpp
View Options
#include "catch.hpp"
#include "specmicp_common/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