MXS-2014 Add skeleton test for mxb::Log
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
enable_testing()
|
||||
|
||||
project(maxutils)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -ggdb -Wall -Werror -Wno-unused-function")
|
||||
|
@ -9,3 +9,5 @@ add_library(maxbase STATIC
|
||||
)
|
||||
set_target_properties(maxbase PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||
install(TARGETS maxbase DESTINATION lib)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
4
maxutils/maxbase/src/test/CMakeLists.txt
Normal file
4
maxutils/maxbase/src/test/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
add_executable(test_log test_log.cc)
|
||||
target_link_libraries(test_log maxbase)
|
||||
add_test(test_log test_log)
|
||||
|
23
maxutils/maxbase/src/test/test_log.cc
Normal file
23
maxutils/maxbase/src/test/test_log.cc
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||
*
|
||||
* Change Date: 2022-01-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include <maxbase/log.hh>
|
||||
|
||||
int main()
|
||||
{
|
||||
mxb::Log log;
|
||||
|
||||
MXB_NOTICE("Hello World!");
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user