Skip to content

Commit

Permalink
Add 64 bits builds for MSVC in the CI + disable RAII tests for them a…
Browse files Browse the repository at this point in the history
…s it's not supported.
  • Loading branch information
FranckRJ committed May 10, 2024
1 parent bec66cb commit c348b1f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci_windows_msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
generator: "Visual Studio 16 2019",
architecture: "Win32"
}
- {
name: "Windows 2019 MSVC 2019 x64",
os: windows-2019,
build_type: Debug,
generator: "Visual Studio 16 2019",
architecture: "x64"
}
- {
name: "Windows 2022 MSVC 2022 Win32 C++11",
os: windows-2022,
Expand All @@ -31,6 +38,14 @@ jobs:
architecture: "Win32",
cxx_standard: 11
}
- {
name: "Windows 2022 MSVC 2022 x64 C++11",
os: windows-2022,
build_type: Debug,
generator: "Visual Studio 17 2022",
architecture: "x64",
cxx_standard: 11
}
- {
name: "Windows 2022 MSVC 2022 Win32 C++14",
os: windows-2022,
Expand All @@ -39,6 +54,14 @@ jobs:
architecture: "Win32",
cxx_standard: 14
}
- {
name: "Windows 2022 MSVC 2022 x64 C++14",
os: windows-2022,
build_type: Debug,
generator: "Visual Studio 17 2022",
architecture: "x64",
cxx_standard: 14
}
- {
name: "Windows 2022 MSVC 2022 Win32 C++17",
os: windows-2022,
Expand All @@ -47,6 +70,14 @@ jobs:
architecture: "Win32",
cxx_standard: 17
}
- {
name: "Windows 2022 MSVC 2022 x64 C++17",
os: windows-2022,
build_type: Debug,
generator: "Visual Studio 17 2022",
architecture: "x64",
cxx_standard: 17
}
- {
name: "Windows 2022 MSVC 2022 Win32 C++20",
os: windows-2022,
Expand All @@ -55,6 +86,14 @@ jobs:
architecture: "Win32",
cxx_standard: 20
}
- {
name: "Windows 2022 MSVC 2022 x64 C++20",
os: windows-2022,
build_type: Debug,
generator: "Visual Studio 17 2022",
architecture: "x64",
cxx_standard: 20
}
steps:
- uses: actions/checkout@v3
- name: Build project
Expand Down
5 changes: 5 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "^(Appl
target_compile_options(FakeIt_tests PRIVATE -Wall -Wextra -Wno-ignored-qualifiers -O0 -g3)
elseif(MSVC)
target_compile_options(FakeIt_tests PRIVATE /W3 /sdl /Od)

if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
target_compile_definitions(FakeIt_tests PRIVATE FAKEIT_DISABLE_RAII_DEPENDENT_TESTS)
message(STATUS "MSVC 64 bits detected: disabling RAII-dependent tests as it isn't supported for this configuration.")
endif()
endif()

if(OVERRIDE_CXX_STANDARD_FOR_TESTS)
Expand Down
19 changes: 11 additions & 8 deletions tests/type_info_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ using namespace fakeit;
struct TypeInfoTests : tpunit::TestFixture {

TypeInfoTests() :
tpunit::TestFixture(
//
TEST(TypeInfoTests::mock_should_use_same_typeid_as_mocked_class), //
TEST(TypeInfoTests::simple_inheritance_upcast), //
TEST(TypeInfoTests::dynamic_cast_to_same_type__with_concrete_type),
TEST(TypeInfoTests::dynamic_cast_to_same_type__with_abstract_type),
TEST(TypeInfoTests::simple_inheritance_dynamic_down_cast) //
) //
tpunit::TestFixture(
#ifndef FAKEIT_DISABLE_RAII_DEPENDENT_TESTS
TEST(TypeInfoTests::mock_should_use_same_typeid_as_mocked_class),
#endif
TEST(TypeInfoTests::simple_inheritance_upcast),
#ifndef FAKEIT_DISABLE_RAII_DEPENDENT_TESTS
TEST(TypeInfoTests::simple_inheritance_dynamic_down_cast),
#endif
TEST(TypeInfoTests::dynamic_cast_to_same_type__with_concrete_type),
TEST(TypeInfoTests::dynamic_cast_to_same_type__with_abstract_type)
)
{
}

Expand Down

0 comments on commit c348b1f

Please sign in to comment.