Add all asm files to test. Unfortunately, it crashes again. Will
[jitcs.git] / tests / test_adt_range.cpp
blobccbadaef1ce6538a5629d88fe2b639cba0e68d5d
1 #include "jitcs_adt_range.h"
2 #include "unittest.h"
3 #include <vector>
5 using namespace jitcs;
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);
13 r1 = getRange(test1);
14 t.check("Range/1", !r1.isEmpty() && !!r1);
15 t.check("Range/2", *r1 == 0xdeadbeef);
16 ++r1;
17 t.check("Range/3", r1.isEmpty() && !r1);
20 static UnitTestRun _("ADT/Range", test);