test_type.cxx
Go to the documentation of this file.
1 #include "WireCellUtil/Type.h"
2 #include "WireCellUtil/Testing.h"
3 
4 #include <iostream>
5 #include <vector>
6 using namespace std;
7 using namespace WireCell;
8 
9 int main()
10 {
11  int i;
12  vector<int> vi;
13 
14 
15  cerr << "int: " << type(i) << endl;
16  cerr << "vector<int>: \"" << type(vi) << "\"\n";
17 
18 
19 // the two don't give exactly the same pattern....
20 #if defined (__clang__)
21  AssertMsg("std::__1::vector<int, std::__1::allocator<int> >" == type(vi), "Clang demangling fails");
22 #else
23  AssertMsg("std::vector<int, std::allocator<int> >" == type(vi), "GCC demangling fails");
24 #endif
25 
26 }
STL namespace.
Definition: Main.h:22
static QCString type
Definition: declinfo.cpp:672
#define AssertMsg
Definition: Testing.h:8
int main()
Definition: test_type.cxx:9
QTextStream & endl(QTextStream &s)