MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / check_oob

Function check_oob

tests/bytes.cc:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace snowhouse;
6
7static void check_oob(Bytes& b, unsigned pos)
8{
9 try
10 {
11 b[pos];
12 }
13 catch (const std::out_of_range& e)
14 {
15 return;
16 }
17
18 assert(false);
19}
20
21static void test_bounds()
22{

Callers 1

test_boundsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_boundsFunction · 0.68