test_indexedset.cxx
Go to the documentation of this file.
1 #include "WireCellUtil/Testing.h"
3 
4 using namespace WireCell;
5 
6 
7 
8 int main()
9 {
10  IndexedSet<int> isi;
11  AssertMsg (isi(42) == 0, "Failed to index");
12  AssertMsg (isi(69) == 1, "Failed to index");
13  AssertMsg (isi(42) == 0, "Failed to index");
14  AssertMsg (isi(0) == 2, "Failed to index");
15  AssertMsg (isi(0) == 2, "Failed to index");
16  AssertMsg (isi(69) == 1, "Failed to index");
17 
18  AssertMsg(isi.collection.size() == 3, "Wrong number of stuff in the collection");
19 
20  return 0;
21 }
collection_type collection
Definition: IndexedSet.h:22
int main()
Definition: Main.h:22
#define AssertMsg
Definition: Testing.h:8