-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba942f8
commit 72d6ef7
Showing
6 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/build/ | ||
/cmake-build-debug/ | ||
/server/ | ||
/test/cmake-build-debug/ | ||
/include/osmformat.pb.o | ||
/include/osmformat.pb.h | ||
/include/vector_tile.pb.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
project(tilemaker_test) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
# Project settings | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ".") | ||
|
||
# Dependencies | ||
find_package(Boost COMPONENTS filesystem system unit_test_framework REQUIRED) | ||
|
||
# Assign the include directories | ||
include_directories(${Boost_INCLUDE_DIRS}) | ||
include_directories(${UNIT_TESTS_INCLUDES}) | ||
|
||
# Build unit tests | ||
add_executable(tilemaker_test test_helpers.cpp) | ||
target_link_libraries(tilemaker_test ${Boost_LIBRARIES} libtilemaker) | ||
|
||
enable_testing() | ||
add_test(tilemaker_test tilemaker_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#define BOOST_TEST_DYN_LINK | ||
#define BOOST_TEST_MAIN | ||
#include <boost/test/unit_test.hpp> | ||
|
||
#include "../include/helpers.h" | ||
|
||
BOOST_AUTO_TEST_SUITE(HelpersSuite) | ||
|
||
BOOST_AUTO_TEST_CASE(CompressDecompress) { | ||
std::string original = "hello world"; | ||
std::string compressed = compress_string(original, 9); | ||
BOOST_REQUIRE_EQUAL(decompress_string(compressed, false), original); | ||
} | ||
|
||
BOOST_AUTO_TEST_SUITE_END() |