X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_filter_frontend_net.cpp;h=4648222d10cadc8b6367a47cef0efac0d98cbaba;hb=6ed3503878603e0bae8ab0ee62bf900b3a60f2ca;hp=fa6c641cab941d931fd792db253e154c041e8bde;hpb=e9420d437bd61c8683058af046a8dd90c859b6bc;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_frontend_net.cpp b/src/test_filter_frontend_net.cpp index fa6c641..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.10 2005-10-26 10:55:26 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,20 +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(); }; }; -BOOST_AUTO_TEST_CASE( test_filter_frontend_net_1 ) +BOOST_AUTO_UNIT_TEST( test_filter_frontend_net_1 ) { try { @@ -58,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 { @@ -72,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 @@ -98,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 {