Functions
test_indexedset.cxx File Reference
#include "WireCellUtil/Testing.h"
#include "WireCellUtil/IndexedSet.h"

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 8 of file test_indexedset.cxx.

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
#define AssertMsg
Definition: Testing.h:8