test(exports): drop the PPSA07411 export test
CONTRIBUTING asks for no tests that only check that a symbol is exported. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a03afed4c3
commit
34688d3a69
|
|
@ -12,13 +12,4 @@ if(BUILD_TESTING)
|
|||
set_tests_properties(guest_ssl PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceSsl>")
|
||||
endif()
|
||||
add_test_executable(guest_ppsa07411_exports_tests ${LIBS_INCLUDE_DIR}/tests/GuestPPSA07411Exports.cpp)
|
||||
target_include_directories(guest_ppsa07411_exports_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(guest_ppsa07411_exports_tests PRIVATE libSceSsl libSceJson2 libSceNpSessionSignaling libSceConvertKeycode libc)
|
||||
configure_windows_unwind(guest_ppsa07411_exports_tests)
|
||||
add_test(NAME guest_ppsa07411_exports COMMAND guest_ppsa07411_exports_tests)
|
||||
if(WIN32)
|
||||
set_tests_properties(guest_ppsa07411_exports PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceSsl>")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
extern "C" {
|
||||
int APS5_VABI sceSslCreateConnection();
|
||||
int APS5_VABI sceSslDeleteConnection();
|
||||
int APS5_VABI sceSslEnableVerifyOption();
|
||||
int APS5_VABI sceSslConnect();
|
||||
int APS5_VABI sceSslRead();
|
||||
int APS5_VABI sceSslWrite();
|
||||
int APS5_VABI sceConvertKeycodeGetCharacter();
|
||||
int APS5_VABI sceNpSessionSignalingGetGroupFromSessionId();
|
||||
int APS5_VABI _ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_();
|
||||
int APS5_VABI _ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_();
|
||||
int APS5_VABI _ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_();
|
||||
int APS5_VABI _ZNK3sce4Json5ValuecvbEv();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct Export {
|
||||
const char* name;
|
||||
int (APS5_VABI *function)();
|
||||
};
|
||||
|
||||
const Export exports[] = {
|
||||
{"sceSslCreateConnection", sceSslCreateConnection},
|
||||
{"sceSslDeleteConnection", sceSslDeleteConnection},
|
||||
{"sceSslEnableVerifyOption", sceSslEnableVerifyOption},
|
||||
{"sceSslConnect", sceSslConnect},
|
||||
{"sceSslRead", sceSslRead},
|
||||
{"sceSslWrite", sceSslWrite},
|
||||
{"sceConvertKeycodeGetCharacter", sceConvertKeycodeGetCharacter},
|
||||
{"sceNpSessionSignalingGetGroupFromSessionId", sceNpSessionSignalingGetGroupFromSessionId},
|
||||
{"_ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_", _ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_},
|
||||
{"_ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_", _ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_},
|
||||
{"_ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_", _ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_},
|
||||
{"_ZNK3sce4Json5ValuecvbEv", _ZNK3sce4Json5ValuecvbEv},
|
||||
};
|
||||
|
||||
bool ReportsNotImplemented(const Export& entry) {
|
||||
try {
|
||||
entry.function();
|
||||
} catch (const std::runtime_error& error) {
|
||||
if (std::string(error.what()) == std::string(entry.name) + " not implemented") return true;
|
||||
std::fprintf(stderr, "%s threw: %s\n", entry.name, error.what());
|
||||
return false;
|
||||
}
|
||||
std::fprintf(stderr, "%s returned instead of reporting that it is not implemented\n", entry.name);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
bool correct = true;
|
||||
for (const auto& entry : exports) correct &= ReportsNotImplemented(entry);
|
||||
return correct ? 0 : 1;
|
||||
}
|
||||
Loading…
Reference in New Issue