then function with both resolve and reject callbacks

also fix problem with throw exceptions from fail
This commit is contained in:
2018-12-10 11:28:16 +07:00
parent 704715db17
commit c4f2a96023
3 changed files with 210 additions and 168 deletions

View File

@@ -1,16 +1,17 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(promise)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
endif(MSVC)
file(GLOB test_sources "*.cpp" "*.hpp")
add_executable(${PROJECT_NAME} ${test_sources})
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO)
if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /bigobj)
endif(MSVC)
enable_testing()
add_test(${PROJECT_NAME} ${PROJECT_NAME})