1 #include "jitcs_adt_range.h"
7 static void test(UnitTest
& t
) {
8 std::vector
<int> test1
;
9 Range
<std::vector
<int>::iterator
> r1
= getRange(test1
);
10 t
.check("Range/0", r1
.isEmpty() && !r1
);
12 test1
.push_back(0xdeadbeef);
14 t
.check("Range/1", !r1
.isEmpty() && !!r1
);
15 t
.check("Range/2", *r1
== 0xdeadbeef);
17 t
.check("Range/3", r1
.isEmpty() && !r1
);
20 static UnitTestRun
_("ADT/Range", test
);