Browse Source

- added calls of test TestFetchfile

master
Andreas Romeyke 3 years ago
parent
commit
3cbfbd4185
1 changed files with 33 additions and 0 deletions
  1. +33
    -0
      test/test_fetchfile.cpp

+ 33
- 0
test/test_fetchfile.cpp View File

@ -0,0 +1,33 @@
#define BOOST_TEST_MODULE TestFetchFile
#include <boost/test/unit_test.hpp>
#include <string>
#include <iostream>
namespace utf = boost::unit_test;
#include "fetchfile.hpp"
using namespace std;
bool check_constructor(string dir) {
try {
Fetchfile p( dir );
return true;
} catch (exception &e) {
return false;
}
}
bool check_validation(string dir) {
list<string> log;
Fetchfile p( dir );
return p.validate( log);
}
BOOST_AUTO_TEST_CASE(constructor1) {BOOST_TEST(check_constructor(""));};
BOOST_AUTO_TEST_CASE(constructor2) {BOOST_TEST(check_constructor("./"));};
BOOST_AUTO_TEST_CASE(constructor3) {BOOST_TEST(check_constructor("/tmp/"));};
BOOST_AUTO_TEST_CASE(check_validation_ok) {BOOST_TEST(check_validation("../testbags/bag_minimal_ok/"));};
BOOST_AUTO_TEST_CASE(check_validation_buggy) {BOOST_TEST(check_validation("../testbags/1008_buggy/"));};
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

Loading…
Cancel
Save