summaryrefslogtreecommitdiffabout
path: root/test
authorMichael Krelin <hacker@klever.net>2008-02-16 17:49:22 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-16 17:49:22 (UTC)
commit21bddce2d98394865cf2ed0b144f92bbb6993bc9 (patch) (side-by-side diff)
treee30194fab08a704885ae00c711e1707dc73bed83 /test
parentccdfc6eacec435a59d773127762ad0b6bce07149 (diff)
downloadlibopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.zip
libopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.tar.gz
libopkele-21bddce2d98394865cf2ed0b144f92bbb6993bc9.tar.bz2
moved some stuff out of the now installed util.h header
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'test') (more/less context) (ignore whitespace changes)
-rw-r--r--test/idiscover.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/idiscover.cc b/test/idiscover.cc
index 44df9ce..4b1e90c 100644
--- a/test/idiscover.cc
+++ b/test/idiscover.cc
@@ -1,40 +1,41 @@
#include <iostream>
#include <stdexcept>
#include <iterator>
#include <algorithm>
using namespace std;
#include <opkele/exception.h>
#include <opkele/discovery.h>
#include <opkele/util.h>
+#include <opkele/util-internal.h>
namespace opkele {
ostream& operator<<(ostream& o,const opkele::openid_endpoint_t& oep) {
o
<< " URI: " << oep.uri << endl
<< " Claimed ID: " << oep.claimed_id << endl
<< " Local ID: " << oep.local_id << endl;
return o;
}
}
int main(int argc,char **argv) {
try {
if(argc<2)
throw opkele::exception(OPKELE_CP_ "Please, give me something to resolve");
for(int a=1;a<argc;++a) {
cout << "==============================================================" << endl
<< "User-supplied ID: " << argv[a] << endl
<< "Endpoints:" << endl
<< " --" << endl;
string normalized = opkele::idiscover(
ostream_iterator<opkele::openid_endpoint_t>(cout," --\n")
,argv[a]);
cout << "Normalized ID: " << normalized << endl;
}
}catch(exception& e) {
cerr << "oops, caught " << opkele::util::abi_demangle(typeid(e).name()) << endl
<< " .what(): " << e.what() << endl;
_exit(1);
}
_exit(0);
}