Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120740659
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
Sun, Jul 6, 17:15
Size
567 B
Mime Type
text/x-c
Expires
Tue, Jul 8, 17:15 (2 d)
Engine
blob
Format
Raw Data
Handle
27240639
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