Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 64 bits builds for MSVC in the CI. #335

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_RTTI_DEPENDENT_TESTS)
message(STATUS "MSVC 64 bits detected: disabling RTTI-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_RTTI_DEPENDENT_TESTS
TEST(TypeInfoTests::mock_should_use_same_typeid_as_mocked_class),
#endif
TEST(TypeInfoTests::simple_inheritance_upcast),
#ifndef FAKEIT_DISABLE_RTTI_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
Loading