- rework the testsuite after new boost in factory broke it.
[platform/upstream/libzypp.git] / tests / zypp / Digest_test.cc
index 8e7ef63..b385c7f 100644 (file)
@@ -5,22 +5,15 @@
 #include <list>
 #include <string>
 
-// Boost.Test
-#include <boost/test/floating_point_comparison.hpp>
 #include <boost/test/unit_test.hpp>
 
-using boost::unit_test::test_suite;
-using boost::unit_test::test_case;
-using boost::test_tools::close_at_tolerance;
-
-// parameterized test
-// http://www.boost.org/libs/test/example/unit_test_example4.cpp
-
 #include "zypp/base/Logger.h"
 #include "zypp/base/Exception.h"
 #include "zypp/PathInfo.h"
 #include "zypp/Digest.h"
 
+using boost::unit_test::test_case;
+
 using namespace std;
 using namespace zypp;
 using namespace zypp::filesystem;
@@ -29,7 +22,7 @@ using namespace zypp::filesystem;
  * Test case for
  * static std::string digest(const std::string& name, std::istream& is, size_t bufsize = 4096);
  */
-void digest_test()
+BOOST_AUTO_TEST_CASE(digest)
 {
   string data("I will test the checksum of this");
   stringstream str1(data);
@@ -41,12 +34,3 @@ void digest_test()
   // FIXME i think it should throw
   BOOST_CHECK_EQUAL( Digest::digest( "lalala", str3) , "" ); 
 }
-
-test_suite*
-init_unit_test_suite( int, char* [] )
-{
-    test_suite* test= BOOST_TEST_SUITE( "DigestTest" );
-    test->add( BOOST_TEST_CASE( &digest_test ), 0 /* expected zero error */ );
-    return test;
-}
-