Let's make the tests also compile with boost 1.33 (auto_unit_test.hpp is
[platform/upstream/libzypp.git] / tests / zypp / CheckSum_test.cc
1
2 #include <iostream>
3 #include <list>
4 #include <string>
5
6 // Boost.Test
7 #include <boost/test/auto_unit_test.hpp>
8
9 #include "zypp/base/Logger.h"
10 #include "zypp/base/Exception.h"
11 #include "zypp/ZYppFactory.h"
12 #include "zypp/ZYpp.h"
13
14 using boost::unit_test::test_case;
15 using namespace std;
16 using namespace zypp;
17
18
19 // most frequently you implement test cases as a free functions
20 BOOST_AUTO_TEST_CASE(checksum_test)
21 {
22   BOOST_CHECK_THROW( CheckSum( "sha1", "dsdsads" ), Exception ); // wrong size
23   BOOST_CHECK_THROW( CheckSum( "sha256", "dsdsads" ), Exception ); // wrong size
24   BOOST_CHECK_THROW( CheckSum( "md5", "dsdsads" ), Exception ); // wrong size
25   BOOST_CHECK_THROW( CheckSum( "md4", "dsdsads" ), Exception ); // wrong size
26   BOOST_CHECK_THROW( CheckSum( "md2", "dsdsads" ), Exception ); // wrong size
27
28 }