Browse Source

- added BOOST_AUTO_TEST_SUITE()

master
Andreas Romeyke 1 year ago
parent
commit
12a7cd52e7
  1. 4
      test/test_bagmetadata.cpp
  2. 5
      test/test_fetchfile.cpp
  3. 3
      test/test_payload.cpp
  4. 4
      test/test_payloadmanifest.cpp
  5. 2
      test/test_tagmanifest.cpp
  6. 6
      test/testbag.cpp

4
test/test_bagmetadata.cpp

@ -7,7 +7,7 @@
namespace fs = boost::filesystem;
#include "bagmetadata.hpp"
#include "checksum.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
void debug( Bagmetadata * p) {
@ -278,6 +278,6 @@ BOOST_AUTO_TEST_CASE(check_set_has_get_BagGroupIdentifier_ok) {BOOST_TEST
BOOST_AUTO_TEST_CASE(check_set_has_get_BagCount_ok) {BOOST_TEST(check_set_has_get_BagCount("../testbags_bag_minimal_ok/", "test"));};
BOOST_AUTO_TEST_CASE(check_set_has_get_InternalSenderIdentifier_ok) {BOOST_TEST(check_set_has_get_InternalSenderIdentifier("../testbags_bag_minimal_ok/", "test"));};
BOOST_AUTO_TEST_CASE(check_set_has_get_InternalSenderDescription_ok) {BOOST_TEST(check_set_has_get_InternalSenderDescription("../testbags_bag_minimal_ok/", "test"));};
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

5
test/test_fetchfile.cpp

@ -8,9 +8,10 @@
namespace fs = boost::filesystem;
#include "fetchfile.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
bool check_constructor(string dir) {
try {
Fetchfile p( std::move(dir) );
@ -72,5 +73,5 @@ BOOST_AUTO_TEST_CASE(check_fetchfile) {BOOST_TEST( check_get_fetchfile("../testb
BOOST_AUTO_TEST_CASE(check_store_ok) {BOOST_TEST(check_store("../testbags/bag_minimal_ok/", "/tmp/testbag/"));};
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

3
test/test_payload.cpp

@ -5,7 +5,7 @@
#include <utility>
#include "payload.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
bool check_constructor(string dir) {
@ -53,4 +53,5 @@ BOOST_AUTO_TEST_CASE(check_validation_ok) {BOOST_TEST(check_validation("../testb
BOOST_AUTO_TEST_CASE(check_validation_buggy) {BOOST_TEST(!check_validation("../testbags/1008_buggy/"));};
BOOST_AUTO_TEST_CASE(check_rel_paths) { BOOST_TEST(check_relative_paths()); };
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

4
test/test_payloadmanifest.cpp

@ -5,11 +5,10 @@
#include <utility>
#include "payloadmanifest.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
bool check_constructor(string dir) {
try {
Payloadmanifest p( std::move(dir) );
@ -83,4 +82,5 @@ BOOST_AUTO_TEST_CASE(check_validation_buggy) {BOOST_TEST(!check_validation("../t
BOOST_AUTO_TEST_CASE(check_checksum_file_pairs) {BOOST_TEST( check_get_checksum_file_pairs()); };
BOOST_AUTO_TEST_CASE(check_checksummed_files) { BOOST_TEST(check_get_checksummed_files()); };
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

2
test/test_tagmanifest.cpp

@ -6,6 +6,7 @@
#include "tagmanifest.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
@ -85,5 +86,6 @@ BOOST_AUTO_TEST_CASE(check_checksum_file_pairs) {BOOST_TEST( check_get_checksum_
BOOST_AUTO_TEST_CASE(check_checksummed_files) { BOOST_TEST(check_get_checksummed_files()); };
BOOST_AUTO_TEST_CASE(check_tag_manifest) {BOOST_TEST(check_has_tagmanifest("../testbags/bag_minimal_ok/"));};
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

6
test/testbag.cpp

@ -1,10 +1,11 @@
#define BOOST_TEST_MODULE Mytest
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <utility>
#include <iostream>
#include "bag.hpp"
BOOST_AUTO_TEST_SUITE(testbag_suite);
using namespace std;
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
@ -173,5 +174,6 @@ BOOST_FIXTURE_TEST_CASE(check_store_ok, TARGETFIXTURE) {
BOOST_TEST(check_store("../testbags/bag_minimal_ok/", targetdir));
};
BOOST_AUTO_TEST_SUITE_END();
// vim: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab
Loading…
Cancel
Save