projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
All filters declare a yp2_filter_struct - used for both static and
[metaproxy-moved-to-github.git]
/
src
/
test_filter_backend_test.cpp
diff --git
a/src/test_filter_backend_test.cpp
b/src/test_filter_backend_test.cpp
index
93903ed
..
d23ee5c
100644
(file)
--- a/
src/test_filter_backend_test.cpp
+++ b/
src/test_filter_backend_test.cpp
@@
-1,4
+1,4
@@
-/* $Id: test_filter_backend_test.cpp,v 1.3 2005-10-26 10:55:26 marc Exp $
+/* $Id: test_filter_backend_test.cpp,v 1.6 2005-12-02 12:21:07 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
Copyright (c) 2005, Index Data.
%LICENSE%
@@
-8,7
+8,7
@@
#include <iostream>
#include <stdexcept>
#include <iostream>
#include <stdexcept>
-#include "test_util.hpp"
+#include "util.hpp"
#include "filter_backend_test.hpp"
#include "filter_log.hpp"
#include "filter_backend_test.hpp"
#include "filter_log.hpp"
@@
-24,7
+24,7
@@
#include <boost/test/auto_unit_test.hpp>
using namespace boost::unit_test;
#include <boost/test/auto_unit_test.hpp>
using namespace boost::unit_test;
-BOOST_AUTO_TEST_CASE( test_filter_backend_test_1 )
+BOOST_AUTO_UNIT_TEST( test_filter_backend_test_1 )
{
try
{
{
try
{
@@
-35,7
+35,7
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_1 )
}
}
}
}
-BOOST_AUTO_TEST_CASE( test_filter_backend_test_2 )
+BOOST_AUTO_UNIT_TEST( test_filter_backend_test_2 )
{
try
{
{
try
{
@@
-46,13
+46,12
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_2 )
yp2::Package pack;
yp2::Package pack;
- ODR odr = odr_createmem(ODR_ENCODE);
+ yp2::odr odr;
Z_APDU *apdu = zget_APDU(odr, Z_APDU_initRequest);
BOOST_CHECK(apdu);
pack.request() = apdu;
Z_APDU *apdu = zget_APDU(odr, Z_APDU_initRequest);
BOOST_CHECK(apdu);
pack.request() = apdu;
- odr_destroy(odr);
// Put it in router
pack.router(router).move();
// Put it in router
pack.router(router).move();
@@
-74,7
+73,7
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_2 )
}
}
}
}
-BOOST_AUTO_TEST_CASE( test_filter_backend_test_3 )
+BOOST_AUTO_UNIT_TEST( test_filter_backend_test_3 )
{
try
{
{
try
{
@@
-87,7
+86,7
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_3 )
// send search request as first request.. That should fail with
// a close from the backend
// send search request as first request.. That should fail with
// a close from the backend
- ODR odr = odr_createmem(ODR_ENCODE);
+ yp2::odr odr;
Z_APDU *apdu = zget_APDU(odr, Z_APDU_searchRequest);
yp2::util::pqf(odr, apdu, "computer");
Z_APDU *apdu = zget_APDU(odr, Z_APDU_searchRequest);
yp2::util::pqf(odr, apdu, "computer");
@@
-100,7
+99,6
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_3 )
BOOST_CHECK(apdu);
pack.request() = apdu;
BOOST_CHECK(apdu);
pack.request() = apdu;
- odr_destroy(odr);
// Put it in router
pack.router(router).move();
// Put it in router
pack.router(router).move();
@@
-122,7
+120,7
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_3 )
}
}
}
}
-BOOST_AUTO_TEST_CASE( test_filter_backend_test_4 )
+BOOST_AUTO_UNIT_TEST( test_filter_backend_test_4 )
{
try
{
{
try
{
@@
-135,13
+133,12
@@
BOOST_AUTO_TEST_CASE( test_filter_backend_test_4 )
// send present request as first request.. That should fail with
// a close from the backend
// send present request as first request.. That should fail with
// a close from the backend
- ODR odr = odr_createmem(ODR_ENCODE);
+ yp2::odr odr;
Z_APDU *apdu = zget_APDU(odr, Z_APDU_presentRequest);
BOOST_CHECK(apdu);
pack.request() = apdu;
Z_APDU *apdu = zget_APDU(odr, Z_APDU_presentRequest);
BOOST_CHECK(apdu);
pack.request() = apdu;
- odr_destroy(odr);
// Put it in router
pack.router(router).move();
// Put it in router
pack.router(router).move();