Browse Source

- added BOOST_AUTO_TEST_SUITE()

master
Andreas Romeyke 2 months ago
parent
commit
12a7cd52e7
6 changed files with 15 additions and 9 deletions
  1. +2
    -2
      test/test_bagmetadata.cpp
  2. +3
    -2
      test/test_fetchfile.cpp
  3. +2
    -1
      test/test_payload.cpp
  4. +2
    -2
      test/test_payloadmanifest.cpp
  5. +2
    -0
      test/test_tagmanifest.cpp
  6. +4
    -2
      test/testbag.cpp

+ 2
- 2
test/test_bagmetadata.cpp View File

@@ -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

+ 3
- 2
test/test_fetchfile.cpp View File

@@ -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

+ 2
- 1
test/test_payload.cpp View File

@@ -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

+ 2
- 2
test/test_payloadmanifest.cpp View File

@@ -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
- 0
test/test_tagmanifest.cpp View File

@@ -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

+ 4
- 2
test/testbag.cpp View File

@@ -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