aboutsummaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-05-30 12:06:10 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-05-30 12:06:10 +0200
commit6fbfa8eead3dca8edd427bbf4abf496cc3366d14 (patch)
tree63e040eaba7b95f4593c7acfef01733cdcdb78ea /test/unit
parenta3c592894d01095776ed96593edb0550ec1a68fe (diff)
downloadPROJ-6fbfa8eead3dca8edd427bbf4abf496cc3366d14.tar.gz
PROJ-6fbfa8eead3dca8edd427bbf4abf496cc3366d14.zip
Move catch.hpp header in test/; rename test/cpp as test/unit
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/CMakeLists.txt13
-rw-r--r--test/unit/Makefile.am13
-rw-r--r--test/unit/basic_test.cpp35
3 files changed, 61 insertions, 0 deletions
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
new file mode 100644
index 00000000..64fbede0
--- /dev/null
+++ b/test/unit/CMakeLists.txt
@@ -0,0 +1,13 @@
+SET(CATCH2_INCLUDE ../catch.hpp)
+include_directories(..)
+
+SET(BASIC_TEST_SRC basic_test.cpp)
+add_executable(basic_test ${BASIC_TEST_SRC} ${CATCH2_INCLUDE})
+target_link_libraries(basic_test ${PROJ_LIBRARIES} ${TEST_MAIN_LIBRARIES})
+set_target_properties(basic_test
+ PROPERTIES
+ LINKER_LANGUAGE CXX)
+
+add_test( NAME basic_test
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test
+ COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/basic_test )
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
new file mode 100644
index 00000000..3476dd96
--- /dev/null
+++ b/test/unit/Makefile.am
@@ -0,0 +1,13 @@
+EXTRA_DIST = CMakeLists.txt
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/test
+
+bin_PROGRAMS = basic_test
+
+basic_test_SOURCES = basic_test.cpp
+basic_test_LDADD = ../../src/libproj.la ../../test/libtestmain.la
+
+basic_test-check: basic_test
+ ./basic_test
+
+check-local: basic_test-check
diff --git a/test/unit/basic_test.cpp b/test/unit/basic_test.cpp
new file mode 100644
index 00000000..5a153331
--- /dev/null
+++ b/test/unit/basic_test.cpp
@@ -0,0 +1,35 @@
+/******************************************************************************
+ *
+ * Project: PROJ
+ * Purpose: Test
+ * Author: Even Rouault <even dot rouault at spatialys dot com>
+ *
+ ******************************************************************************
+ * Copyright (c) 2018, Even Rouault <even dot rouault at spatialys dot com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#include "catch.hpp"
+
+// ---------------------------------------------------------------------------
+
+TEST_CASE( "dumy" ) {
+ CHECK( 1 == 1 );
+}