X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_filter_frontend_net.cpp;h=4648222d10cadc8b6367a47cef0efac0d98cbaba;hb=743341841a21a695d08c99b27a30329119030db5;hp=9969b21911ebc6bb50df50e05f2a30112df57371;hpb=7467b072bb64f5c8575daa9917cce7df62d832f1;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_frontend_net.cpp b/src/test_filter_frontend_net.cpp index 9969b21..4648222 100644 --- a/src/test_filter_frontend_net.cpp +++ b/src/test_filter_frontend_net.cpp @@ -1,4 +1,4 @@ -/* $Id: test_filter_frontend_net.cpp,v 1.11 2005-10-29 22:23:36 marc Exp $ +/* $Id: test_filter_frontend_net.cpp,v 1.14 2005-12-02 12:21:07 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -8,6 +8,7 @@ #include #include +#include "util.hpp" #include "filter_frontend_net.hpp" #include "router_chain.hpp" @@ -32,23 +33,19 @@ public: if (gdu) { // std::cout << "Got PDU. Sending init response\n"; - ODR odr = odr_createmem(ODR_ENCODE); + yp2::odr odr; Z_APDU *apdu = zget_APDU(odr, Z_APDU_initResponse); apdu->u.initResponse->implementationName = "YP2/YAZ"; package.response() = apdu; - odr_destroy(odr); } return package.move(); }; - const std::string type() const { - return "FilterInit"; - }; }; -BOOST_AUTO_TEST_CASE( test_filter_frontend_net_1 ) +BOOST_AUTO_UNIT_TEST( test_filter_frontend_net_1 ) { try { @@ -61,7 +58,7 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_1 ) } } -BOOST_AUTO_TEST_CASE( test_filter_frontend_net_2 ) +BOOST_AUTO_UNIT_TEST( test_filter_frontend_net_2 ) { try { @@ -75,11 +72,10 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_2 ) // Create package with Z39.50 init request in it yp2::Package pack; - ODR odr = odr_createmem(ODR_ENCODE); + yp2::odr odr; Z_APDU *apdu = zget_APDU(odr, Z_APDU_initRequest); pack.request() = apdu; - odr_destroy(odr); // Done creating query. // Put it in router @@ -101,7 +97,7 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_2 ) } } -BOOST_AUTO_TEST_CASE( test_filter_frontend_net_3 ) +BOOST_AUTO_UNIT_TEST( test_filter_frontend_net_3 ) { try {