8000 Move last test and remove pathenumerator...was not in use and broken · georgekaf/arangodb@8a79e5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a79e5f

Browse files
author
Andreas Streichardt
committed
Move last test and remove pathenumerator...was not in use and broken
1 parent 89bb878 commit 8a79e5f

File tree

3 files changed

+7
-189
lines changed

3 files changed

+7
-189
lines changed

UnitTests/Basics/PathEnumeratorTest.cpp

Lines changed: 0 additions & 168 deletions
This file was deleted.

UnitTests/Basics/VelocyPackHelper-test.cpp renamed to tests/Basics/VelocyPackHelper-test.cpp

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828
#include "Basics/Common.h"
2929

30-
#define BOOST_TEST_INCLUDED
31-
#include <boost/test/unit_test.hpp>
30+
#include "catch.hpp"
3231

3332
#include <velocypack/Builder.h>
3433
#include <velocypack/Parser.h>
@@ -43,28 +42,14 @@
4342
#define VPACK_CHECK(expected, func, lValue, rValue) \
4443
l = VPackParser::fromJson(lValue); \
4544
r = VPackParser::fromJson(rValue); \
46-
BOOST_CHECK_EQUAL(expected, func(l->slice(), r->slice(), true)); \
45+
CHECK(expected == func(l->slice(), r->slice(), true)); \
4746

4847
#define INIT_BUFFER TRI_string_buffer_t* sb = TRI_CreateStringBuffer(TRI_UNKNOWN_MEM_ZONE);
4948
#define FREE_BUFFER TRI_FreeStringBuffer(TRI_UNKNOWN_MEM_ZONE, sb);
5049
#define STRINGIFY TRI_StringifyJson(sb, json);
5150
#define STRING_VALUE sb->_buffer
5251
#define FREE_JSON TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, json);
5352

54-
// -----------------------------------------------------------------------------
55-
// --SECTION-- setup / tear-down
56-
// -----------------------------------------------------------------------------
57-
58-
struct VPackHelperSetup {
59-
VPackHelperSetup () {
60-
BOOST_TEST_MESSAGE("setup VelocyPackHelper test");
61-
}
62-
63-
~VPackHelperSetup () {
64-
BOOST_TEST_MESSAGE("tear-down VelocyPackHelper test");
65-
}
66-
};
67-
6853
// -----------------------------------------------------------------------------
6954
// --SECTION-- test suite
7055
// -----------------------------------------------------------------------------
@@ -73,13 +58,13 @@ struct VPackHelperSetup {
7358
/// @brief setup
7459
////////////////////////////////////////////////////////////////////////////////
7560

76-
BOOST_FIXTURE_TEST_SUITE(VPackHelperTest, VPackHelperSetup)
61+
TEST_CASE("VPackHelperTest", "[vpack]") {
7762

7863
////////////////////////////////////////////////////////////////////////////////
7964
/// @brief test compare values with equal values
8065
////////////////////////////////////////////////////////////////////////////////
8166

82-
BOOST_AUTO_TEST_CASE (tst_compare_values_equal) {
67+
SECTION("tst_compare_values_equal") {
8368
std::shared_ptr<VPackBuilder> l;
8469
std::shared_ptr<VPackBuilder> r;
8570

@@ -106,7 +91,7 @@ BOOST_AUTO_TEST_CASE (tst_compare_values_equal) {
10691
/// @brief test compare values with unequal values
10792
////////////////////////////////////////////////////////////////////////////////
10893

109-
BOOST_AUTO_TEST_CASE (tst_compare_values_unequal) {
94+
SECTION("tst_compare_values_unequal") {
11095
std::shared_ptr<VPackBuilder> l;
11196
std::shared_ptr<VPackBuilder> r;
11297
VPACK_CHECK(-1, arangodb::basics::VelocyPackHelper::compare, "null", "false");
@@ -188,7 +173,7 @@ BOOST_AUTO_TEST_CASE (tst_compare_values_unequal) {
188173
/// @brief generate tests
189174
////////////////////////////////////////////////////////////////////////////////
190175

191-
BOOST_AUTO_TEST_SUITE_END ()
176+
}
192177

193178
// Local Variables:
194179
// mode: outline-minor

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ add_executable(
2727
Basics/EndpointTest.cpp
2828
Basics/StringBufferTest.cpp
2929
Basics/StringUtilsTest.cpp
30+
Basics/VelocyPackHelper-test.cpp
3031
Cache/CachedValue.cpp
3132
Cache/FrequencyBuffer.cpp
3233
Cache/Manager.cpp

0 commit comments

Comments
 (0)
0