add test
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 1 Feb 2008 23:19:57 +0000 (23:19 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 1 Feb 2008 23:19:57 +0000 (23:19 +0000)
tests/zypp/CMakeLists.txt
tests/zypp/RepoStatus_test.cc [new file with mode: 0644]

index bf85e593608517bcb0659485a9ef150100c42d5a..8188c4f953da0ded50e746b255ca04e37280871d 100644 (file)
@@ -62,6 +62,9 @@ TARGET_LINK_LIBRARIES( RepoManager zypp boost_unit_test_framework )
 ADD_EXECUTABLE( RepoInfo RepoInfo_test.cc )
 TARGET_LINK_LIBRARIES( RepoInfo zypp boost_unit_test_framework )
 
+ADD_EXECUTABLE( RepoStatus RepoStatus_test.cc )
+TARGET_LINK_LIBRARIES( RepoStatus zypp boost_unit_test_framework )
+
 ADD_EXECUTABLE( ProgressData ProgressData_test.cc )
 TARGET_LINK_LIBRARIES( ProgressData zypp boost_unit_test_framework )
 
@@ -91,3 +94,4 @@ ADD_TEST(FetcherTest ${CMAKE_CURRENT_BINARY_DIR}/Fetcher)
 ADD_TEST(ProgressData_test ${CMAKE_CURRENT_BINARY_DIR}/ProgressData)
 ADD_TEST(Vendor1Test ${CMAKE_CURRENT_BINARY_DIR}/Vendor1)
 ADD_TEST(Vendor2Test ${CMAKE_CURRENT_BINARY_DIR}/Vendor2)
+ADD_TEST(RepoStatus ${CMAKE_CURRENT_BINARY_DIR}/RepoStatus)
diff --git a/tests/zypp/RepoStatus_test.cc b/tests/zypp/RepoStatus_test.cc
new file mode 100644 (file)
index 0000000..c9883d0
--- /dev/null
@@ -0,0 +1,34 @@
+
+#include "zypp/base/Logger.h"
+#include "zypp/base/Exception.h"
+#include "zypp/TmpPath.h"
+#include "zypp/RepoStatus.h"
+#include "zypp/PathInfo.h"
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/parameterized_test.hpp>
+#include <boost/test/unit_test_log.hpp>
+
+using boost::unit_test::test_suite;
+using boost::unit_test::test_case;
+using namespace boost::unit_test::log;
+
+using namespace std;
+using namespace zypp;
+using namespace zypp::filesystem;
+using namespace zypp::repo;
+
+void repostatus_test()
+{
+  TmpDir tmpPath;
+  RepoStatus status;
+}
+
+test_suite*
+init_unit_test_suite( int argc, char* argv[] )
+{
+  test_suite* test= BOOST_TEST_SUITE( "RepoStatus" );
+  test->add( BOOST_TEST_CASE( &repostatus_test ), 0 /* expected zero error */ );
+  return test;
+}
+