From 98bfb8467ad8ec7973c4560c56464898255587d0 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 13 Aug 2015 11:48:54 -0700 Subject: [PATCH] test(test/shared): add small program for testing shared library --- src/CMakeLists.txt | 1 + src/tests/shared/CMakeLists.txt | 2 ++ src/tests/shared/shared.cpp | 15 +++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/tests/shared/CMakeLists.txt create mode 100644 src/tests/shared/shared.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea73071c1..11b2a8606 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -367,6 +367,7 @@ add_subdirectory(tests/library) add_subdirectory(tests/library/blast) add_subdirectory(tests/frontends/lean) add_subdirectory(tests/shell) +add_subdirectory(tests/shared) # Include style check if (NOT(${CMAKE_SYSTEM_NAME} MATCHES "Windows")) diff --git a/src/tests/shared/CMakeLists.txt b/src/tests/shared/CMakeLists.txt new file mode 100644 index 000000000..2a220d0c6 --- /dev/null +++ b/src/tests/shared/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(shared_test shared.cpp) +target_link_libraries(shared_test ${EXTRA_LIBS} leanshared) diff --git a/src/tests/shared/shared.cpp b/src/tests/shared/shared.cpp new file mode 100644 index 000000000..a1704741c --- /dev/null +++ b/src/tests/shared/shared.cpp @@ -0,0 +1,15 @@ +/* +Copyright (c) 2015 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. + +Author: Leonardo de Moura +*/ +#include "kernel/environment.h" +#include "init/init.h" + +int main() { + lean::initializer init; + lean::environment env; + std::cout << "Lean (empty) environment was successfully created\n"; + return 0; +}