mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
test(libc): match the immortal classic locale and run guest_locale in ctest
This commit is contained in:
@@ -286,6 +286,13 @@ target_include_directories(guest_locale_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
set_target_properties(guest_locale_tests PROPERTIES CXX_EXTENSIONS OFF)
|
||||
target_link_libraries(guest_locale_tests PRIVATE libc)
|
||||
configure_windows_unwind(guest_locale_tests)
|
||||
if(BUILD_TESTING)
|
||||
set_target_properties(guest_locale_tests PROPERTIES EXCLUDE_FROM_ALL FALSE)
|
||||
add_test(NAME guest_locale COMMAND guest_locale_tests)
|
||||
if(WIN32)
|
||||
set_tests_properties(guest_locale PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
foreach(runtimeLinkFlag IN ITEMS -static-libgcc -static-libstdc++ -static)
|
||||
|
||||
@@ -57,7 +57,7 @@ static void CheckGuestCalls() {
|
||||
Require(locale->base.references == initial + 1);
|
||||
Require(release(&locale->base) == nullptr);
|
||||
Require(locale->base.references == initial);
|
||||
RequireException([&] { release(&locale->base); });
|
||||
Require(release(&locale->base) == nullptr && locale->base.references == initial);
|
||||
RequireException([&] { retain(nullptr); });
|
||||
RequireException([&] { locale->base.vtable->deleteObject(&locale->base); });
|
||||
Require(locale->base.references == initial);
|
||||
|
||||
Reference in New Issue
Block a user