Skip to content

Commit

Permalink
moved #ifdef to it_utils.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jrse committed Oct 13, 2017
1 parent a0cab33 commit afa9971
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 57 deletions.
11 changes: 0 additions & 11 deletions src/tests/storage-rbox/it_test_copy_rbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ extern "C" {
using ::testing::AtLeast;
using ::testing::Return;

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

TEST_F(StorageTest, init) {}

TEST_F(StorageTest, mailbox_open_inbox) {
Expand Down
11 changes: 0 additions & 11 deletions src/tests/storage-rbox/it_test_move_rbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ extern "C" {
using ::testing::AtLeast;
using ::testing::Return;

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

TEST_F(StorageTest, init) {}

TEST_F(StorageTest, mailbox_open_inbox) {
Expand Down
11 changes: 0 additions & 11 deletions src/tests/storage-rbox/it_test_read_mail_rbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ extern "C" {
using ::testing::AtLeast;
using ::testing::Return;

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

TEST_F(StorageTest, init) {}

TEST_F(StorageTest, mailbox_open_inbox) {
Expand Down
11 changes: 0 additions & 11 deletions src/tests/sync-rbox/it_test_sync_rbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ extern "C" {
using ::testing::AtLeast;
using ::testing::Return;

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

TEST_F(SyncTest, init) {}


Expand Down
11 changes: 0 additions & 11 deletions src/tests/sync-rbox/it_test_sync_rbox_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ extern "C" {
using ::testing::AtLeast;
using ::testing::Return;

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

TEST_F(SyncTest, init) {}


Expand Down
2 changes: 0 additions & 2 deletions src/tests/test-utils/it_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
namespace testutils {

ItUtils::ItUtils() {
// TODO Auto-generated constructor stub
}

ItUtils::~ItUtils() {
// TODO Auto-generated destructor stub
}

void ItUtils::add_mail(const char *message, const char *mailbox, struct mail_namespace *_ns) {
Expand Down
11 changes: 11 additions & 0 deletions src/tests/test-utils/it_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ extern "C" {
#include "mail-search.h"
}

#pragma GCC diagnostic pop
#if DOVECOT_PREREQ(2, 3)
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_internal_error(box, error_r)
#else
#define mailbox_get_last_internal_error(box, error_r) mailbox_get_last_error(box, error_r)
#endif

#ifndef i_zero
#define i_zero(p) memset(p, 0, sizeof(*(p)))
#endif

namespace testutils {

class ItUtils {
Expand Down

0 comments on commit afa9971

Please sign in to comment.