diff --git a/.travis.yml b/.travis.yml index bef489d..71a096c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,14 @@ os: - linux env: - - CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.56.0 - - CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.56.0 - CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.58.0 - - CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.58.0 + - CXX_STANDARD=c++11 BRANCH_TO_TEST=boost-1.58.0 - CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.59.0 - - CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.59.0 + - CXX_STANDARD=c++11 BRANCH_TO_TEST=boost-1.59.0 - CXX_STANDARD=c++98 BRANCH_TO_TEST=master - - CXX_STANDARD=c++0x BRANCH_TO_TEST=master + - CXX_STANDARD=c++11 BRANCH_TO_TEST=master + - CXX_STANDARD=c++14 BRANCH_TO_TEST=master + - CXX_STANDARD=c++17 BRANCH_TO_TEST=master addons: apt: diff --git a/README.md b/README.md index 8238b50..a926488 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,5 @@ Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt). [![Build Status](https://travis-ci.org/mat007/turtle.svg)](https://travis-ci.org/mat007/turtle) +[![Build status](https://ci.appveyor.com/api/projects/status/459hvqkb5rts4hw7?svg=true)](https://ci.appveyor.com/project/mat007/turtle) [![Coverage Status](https://coveralls.io/repos/mat007/turtle/badge.png)](https://coveralls.io/r/mat007/turtle) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..eb6025f --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,43 @@ +# Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# Copyright Mathieu Champlon 2015. + + +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + BOOST_ROOT: C:\Libraries\boost_1_59_0 + TOOLSET: msvc-14.0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + BOOST_ROOT: C:\Libraries\boost_1_65_1 + TOOLSET: msvc-14.1 + +platform: + - 32 + - 64 + +configuration: + - debug + - release + +install: + - mkdir C:\xsltproc + - cd C:\xsltproc + - ps: Invoke-WebRequest ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip -OutFile iconv.zip + - 7z e iconv.zip iconv.dll -r + - ps: Invoke-WebRequest ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip -OutFile libxml2.zip + - 7z e libxml2.zip libxml2.dll -r + - ps: Invoke-WebRequest ftp://ftp.zlatkovic.com/libxml/libxslt-1.1.26.win32.zip -OutFile libxslt.zip + - 7z e libxslt.zip libexslt.dll libxslt.dll xsltproc.exe -r + - ps: Invoke-WebRequest ftp://ftp.zlatkovic.com/libxml/zlib-1.2.5.win32.zip -OutFile zlib.zip + - 7z e zlib.zip zlib1.dll -r + - set PATH=%PATH%;%CD% + - xsltproc --version + +build_script: + - cd %BOOST_ROOT% + - call bootstrap.bat + - cd C:\projects\turtle\build + - call build.bat --toolset=%TOOLSET% address-model=%PLATFORM% --build-type=complete %CONFIGURATION% diff --git a/test/test_integration.cpp b/test/test_integration.cpp index 71ed0c6..d212b8c 100644 --- a/test/test_integration.cpp +++ b/test/test_integration.cpp @@ -146,6 +146,20 @@ BOOST_FIXTURE_TEST_CASE( mock_object_method_with_declared_but_not_defined_parame MOCK_EXPECT( mock.t ); } +namespace +{ + MOCK_FUNCTOR( gf, int( float, const std::string& ) ); +} + +BOOST_FIXTURE_TEST_CASE( mock_functor_in_namespace_is_supported, mock_error_fixture ) +{ + boost::function< int( float, const std::string& ) > func; + MOCK_EXPECT( gf ).once().with( 3, "op" ).returns( 42 ); + func = gf; + BOOST_CHECK_EQUAL( 42, func( 3, "op" ) ); + CHECK_CALLS( 1 ); +} + BOOST_FIXTURE_TEST_CASE( mock_functor_in_function_is_supported, mock_error_fixture ) { boost::function< int( float, const std::string& ) > func;