summaryrefslogtreecommitdiffabout
authorqdii <qdii@reblochon.be>2012-11-02 13:49:03 (UTC)
committer Michael Krelin <hacker@klever.net>2012-11-02 13:49:03 (UTC)
commit648ae5dbd90e062f3432f809a846d50d994b86d4 (patch) (side-by-side diff)
treed9cbb0276d9a51db9243449866f01828dba36ab7
parent824440e52ce8ddf1c45487d20d8996d08d0f96b5 (diff)
downloadlibopkele-648ae5dbd90e062f3432f809a846d50d994b86d4.zip
libopkele-648ae5dbd90e062f3432f809a846d50d994b86d4.tar.gz
libopkele-648ae5dbd90e062f3432f809a846d50d994b86d4.tar.bz2
Function _exit was referenced in the code, but <unistd.h> was not included, causing compilation to fail.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--test/idiscover.cc1
-rw-r--r--test/test.cc1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/idiscover.cc b/test/idiscover.cc
index 4b1e90c..8a5a3fb 100644
--- a/test/idiscover.cc
+++ b/test/idiscover.cc
@@ -1,28 +1,29 @@
#include <iostream>
#include <stdexcept>
#include <iterator>
#include <algorithm>
+#include <unistd.h>
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
diff --git a/test/test.cc b/test/test.cc
index 2143ac0..770e0c6 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -1,26 +1,27 @@
#include <iostream>
#include <stdexcept>
+#include <unistd.h>
using namespace std;
#include <opkele/exception.h>
#include <opkele/util.h>
#include "config.h"
class failed_test : public opkele::exception {
public:
failed_test(OPKELE_E_PARS)
: exception(OPKELE_E_CONS) { }
};
void test_rfc_3986_normalize_uri(const string &ouri,bool success,const string& nuri="") {
try {
string n = opkele::util::rfc_3986_normalize_uri(ouri);
if(!success)
throw failed_test(OPKELE_CP_ "Normalized URI when it shouldn't ('"+ouri+"' normalization resulted in '"+n+"')");
if(n!=nuri)
throw failed_test(OPKELE_CP_ "rfc_3986_test_failed for '"+ouri+"' failed, expected '"+nuri+"', got '"+n+"'");
}catch(opkele::bad_input& obi) {
if(success)
throw failed_test(OPKELE_CP_ "Test '"+ouri+"' failed due to 'bad_input'["+obi.what()+"]");
}catch(opkele::not_implemented& oni) {
if(success)