From a7bfde8ca05e440d29e1e04dbf69de318276bd2f Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Sun, 29 Sep 2024 20:36:32 +0200 Subject: [PATCH] Rename h_results to h_result --- src/xtd.core/CMakeLists.txt | 11 +- .../include/xtd/access_violation_exception.h | 4 +- .../xtd/collections/key_not_found_exception.h | 2 +- src/xtd.core/include/xtd/exception.h | 2 +- src/xtd.core/include/xtd/h_result | 2 + .../include/xtd/{h_results.h => h_result.h} | 71 +++--- src/xtd.core/include/xtd/h_result_category | 2 + ...results_category.h => h_result_category.h} | 14 +- src/xtd.core/include/xtd/h_results | 2 - src/xtd.core/include/xtd/h_results_category | 2 - src/xtd.core/include/xtd/rank_exception.h | 2 +- src/xtd.core/include/xtd/system_exception.h | 2 +- src/xtd.core/include/xtd/xtd.core.h | 4 +- .../src/xtd/access_violation_exception.cpp | 12 +- .../collections/key_not_found_exception.cpp | 12 +- src/xtd.core/src/xtd/exception.cpp | 10 +- src/xtd.core/src/xtd/h_result.cpp | 43 ++++ src/xtd.core/src/xtd/h_result_category.cpp | 12 + src/xtd.core/src/xtd/h_results_category.cpp | 44 ---- src/xtd.core/src/xtd/system_exception.cpp | 12 +- tests/xtd.core.unit_tests/CMakeLists.txt | 2 +- .../src/xtd/tests/exception_tests.cpp | 40 +-- .../src/xtd/tests/get_know_folder_path.h | 2 +- ...h_results_tests.cpp => h_result_tests.cpp} | 232 +++++++++--------- 24 files changed, 276 insertions(+), 265 deletions(-) create mode 100644 src/xtd.core/include/xtd/h_result rename src/xtd.core/include/xtd/{h_results.h => h_result.h} (92%) create mode 100644 src/xtd.core/include/xtd/h_result_category rename src/xtd.core/include/xtd/{h_results_category.h => h_result_category.h} (67%) delete mode 100644 src/xtd.core/include/xtd/h_results delete mode 100644 src/xtd.core/include/xtd/h_results_category create mode 100644 src/xtd.core/src/xtd/h_result.cpp create mode 100644 src/xtd.core/src/xtd/h_result_category.cpp delete mode 100644 src/xtd.core/src/xtd/h_results_category.cpp rename tests/xtd.core.unit_tests/src/xtd/tests/{h_results_tests.cpp => h_result_tests.cpp} (79%) diff --git a/src/xtd.core/CMakeLists.txt b/src/xtd.core/CMakeLists.txt index 2b849c7c1e0..29499475ed3 100644 --- a/src/xtd.core/CMakeLists.txt +++ b/src/xtd.core/CMakeLists.txt @@ -219,10 +219,10 @@ add_sources( include/xtd/guid include/xtd/hash_code.h include/xtd/hash_code - include/xtd/h_results.h - include/xtd/h_results - include/xtd/h_results_category.h - include/xtd/h_results_category + include/xtd/h_result.h + include/xtd/h_result + include/xtd/h_result_category.h + include/xtd/h_result_category include/xtd/iasync_result.h include/xtd/iasync_result include/xtd/iclonable.h @@ -1046,7 +1046,8 @@ add_sources( src/xtd/exception.cpp src/xtd/guid.cpp src/xtd/hash_code.cpp - src/xtd/h_results_category.cpp + src/xtd/h_result.cpp + src/xtd/h_result_category.cpp src/xtd/iformatable.cpp src/xtd/istringable.cpp src/xtd/literals.cpp diff --git a/src/xtd.core/include/xtd/access_violation_exception.h b/src/xtd.core/include/xtd/access_violation_exception.h index efe1a9b8c47..35a4eb6f885 100644 --- a/src/xtd.core/include/xtd/access_violation_exception.h +++ b/src/xtd.core/include/xtd/access_violation_exception.h @@ -2,7 +2,7 @@ /// @brief Contains xtd::access_violation_exception exception. /// @copyright Copyright (c) 2024 Gammasoft. All rights reserved. #pragma once -#include "h_results.h" +#include "h_result.h" #include "system_exception.h" /// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more. @@ -34,7 +34,7 @@ namespace xtd { /// @param inner_exception The exception that is the cause of the current exception. /// @param stack_frame (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically #current_stack_frame_. template - access_violation_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : xtd::system_exception(message, inner_exception, stack_frame) {error_code(h_results::make_error_code(h_results::E_POINTER));} + access_violation_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : xtd::system_exception(message, inner_exception, stack_frame) {error_code(h_result::make_error_code(h_result::E_POINTER));} /// @brief Create a new instance of class access_violation_exception /// @param message Message string associate to the exception. diff --git a/src/xtd.core/include/xtd/collections/key_not_found_exception.h b/src/xtd.core/include/xtd/collections/key_not_found_exception.h index 4497a02342b..51397d84aa2 100644 --- a/src/xtd.core/include/xtd/collections/key_not_found_exception.h +++ b/src/xtd.core/include/xtd/collections/key_not_found_exception.h @@ -44,7 +44,7 @@ namespace xtd { /// @param inner_exception The exception that is the cause of the current exception. /// @param stack_frame (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically #current_stack_frame_. template - key_not_found_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : xtd::system_exception(message, inner_exception, stack_frame) {error_code(h_results::make_error_code(h_results::E_POINTER));} + key_not_found_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : xtd::system_exception(message, inner_exception, stack_frame) {error_code(h_result::make_error_code(h_result::E_POINTER));} /// @brief Create a new instance of class key_not_found_exception /// @param message Message string associate to the exception. diff --git a/src/xtd.core/include/xtd/exception.h b/src/xtd.core/include/xtd/exception.h index 8882b960eae..22fa0a9906c 100644 --- a/src/xtd.core/include/xtd/exception.h +++ b/src/xtd.core/include/xtd/exception.h @@ -5,7 +5,7 @@ #include "diagnostics/stack_frame.h" #include "diagnostics/stack_trace.h" #include "core_export.h" -#include "h_results.h" +#include "h_result.h" #include "literals.h" #include "object.h" #include "optional.h" diff --git a/src/xtd.core/include/xtd/h_result b/src/xtd.core/include/xtd/h_result new file mode 100644 index 00000000000..4c6ca5b5a60 --- /dev/null +++ b/src/xtd.core/include/xtd/h_result @@ -0,0 +1,2 @@ +#pragma once +#include "h_result.h" diff --git a/src/xtd.core/include/xtd/h_results.h b/src/xtd.core/include/xtd/h_result.h similarity index 92% rename from src/xtd.core/include/xtd/h_results.h rename to src/xtd.core/include/xtd/h_result.h index 2796839d2c1..88fed1f1031 100644 --- a/src/xtd.core/include/xtd/h_results.h +++ b/src/xtd.core/include/xtd/h_result.h @@ -1,40 +1,41 @@ /// @file -/// @brief Contains h_results class. +/// @brief Contains h_result class. /// @copyright Copyright (c) 2024 Gammasoft. All rights reserved. #pragma once -#include "h_results_category.h" #include "int32.h" +#include "string.h" #include "static.h" +#include /// @cond #if defined(_WIN32) -#undef S_OK -#undef S_FALSE -#undef CO_E_NOTINITIALIZED -#undef DISP_E_OVERFLOW -#undef E_ABORT -#undef E_BOUNDS -#undef E_CHANGED_STATE -#undef E_FAIL -#undef E_HANDLE -#undef E_INVALIDARG -#undef E_NOTIMPL -#undef E_POINTER -#undef E_UNEXPECTED -#undef ERROR_MRM_MAP_NOT_FOUND -#undef ERROR_TIMEOUT -#undef RO_E_CLOSED -#undef RPC_E_CHANGED_MODE -#undef TYPE_E_TYPEMISMATCH -#undef STG_E_PATHNOTFOUND -#undef ERROR_TOO_MANY_OPEN_FILES -#undef ERROR_SHARING_VIOLATION -#undef ERROR_LOCK_VIOLATION -#undef ERROR_OPEN_FAILED -#undef ERROR_DISK_CORRUPT -#undef ERROR_UNRECOGNIZED_VOLUME -#undef ERROR_DLL_INIT_FAILED -#undef ERROR_FILE_INVALID +# undef S_OK +# undef S_FALSE +# undef CO_E_NOTINITIALIZED +# undef DISP_E_OVERFLOW +# undef E_ABORT +# undef E_BOUNDS +# undef E_CHANGED_STATE +# undef E_FAIL +# undef E_HANDLE +# undef E_INVALIDARG +# undef E_NOTIMPL +# undef E_POINTER +# undef E_UNEXPECTED +# undef ERROR_MRM_MAP_NOT_FOUND +# undef ERROR_TIMEOUT +# undef RO_E_CLOSED +# undef RPC_E_CHANGED_MODE +# undef TYPE_E_TYPEMISMATCH +# undef STG_E_PATHNOTFOUND +# undef ERROR_TOO_MANY_OPEN_FILES +# undef ERROR_SHARING_VIOLATION +# undef ERROR_LOCK_VIOLATION +# undef ERROR_OPEN_FAILED +# undef ERROR_DISK_CORRUPT +# undef ERROR_UNRECOGNIZED_VOLUME +# undef ERROR_DLL_INIT_FAILED +# undef ERROR_FILE_INVALID #endif /// @endcond @@ -47,7 +48,7 @@ namespace xtd { /// xtd.core /// @ingroup xtd_core exceptions /// @remarks For more information, see Winerror.h from Micorosft's Win32 API. - class h_results static_ { + class h_result static_ { public: /// @name Public Fields @@ -287,14 +288,14 @@ namespace xtd { /// @name Public Static Methods /// @{ - /// @brief Obtains a reference to the static error category object for h_result errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_results_category". It is used to identify error conditions that correspond to the xtd::h_results error codes. + /// @brief Obtains a reference to the static error category object for h_result errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_result_category". It is used to identify error conditions that correspond to the xtd::h_result error codes. /// @return A reference to the static object of unspecified runtime type, derived from [std::error_category](https://en.cppreference.com/w/cpp/error/error_category). - static const std::error_category& h_results_category() noexcept {return xtd::h_results_category();} + static const std::error_category& h_result_category() noexcept; - /// @brief Creates error code value for xtd::h_results `h_result`. - /// @param h_result xtd::h_results error code to create error code for. + /// @brief Creates error code value for xtd::h_result `h_result`. + /// @param h_result xtd::h_result error code to create error code for. /// @return Error code corresponding to `h_result`. - static std::error_code make_error_code(int h_result) noexcept {return xtd::make_error_code(h_result);} + static std::error_code make_error_code(int h_result) noexcept; /// &} }; } diff --git a/src/xtd.core/include/xtd/h_result_category b/src/xtd.core/include/xtd/h_result_category new file mode 100644 index 00000000000..e6ca6b5ff8e --- /dev/null +++ b/src/xtd.core/include/xtd/h_result_category @@ -0,0 +1,2 @@ +#pragma once +#include "h_result_category.h" diff --git a/src/xtd.core/include/xtd/h_results_category.h b/src/xtd.core/include/xtd/h_result_category.h similarity index 67% rename from src/xtd.core/include/xtd/h_results_category.h rename to src/xtd.core/include/xtd/h_result_category.h index 0c1871ae1ec..51e6372a786 100644 --- a/src/xtd.core/include/xtd/h_results_category.h +++ b/src/xtd.core/include/xtd/h_result_category.h @@ -1,24 +1,22 @@ /// @file -/// @brief Contains h_results class. +/// @brief Contains h_result class. /// @copyright Copyright (c) 2024 Gammasoft. All rights reserved. #pragma once -#include "int32.h" -#include "string.h" -#include "static.h" +#include /// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more. namespace xtd { - /// @brief Obtains a reference to the static error category object for h_result errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_results_category". It is used to identify error conditions that correspond to the xtd::h_results error codes. + /// @brief Obtains a reference to the static error category object for h_result errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_result_category". It is used to identify error conditions that correspond to the xtd::h_result error codes. /// @return A reference to the static object of unspecified runtime type, derived from [std::error_category](https://en.cppreference.com/w/cpp/error/error_category). /// @par Namespace /// xtd /// @par Library /// xtd.core /// @ingroup xtd_core exceptions - const std::error_category& h_results_category() noexcept; + const std::error_category& h_result_category() noexcept; - /// @brief Creates error code value for xtd::h_results `h_result`. - /// @param h_result xtd::h_results error code to create error code for. + /// @brief Creates error code value for xtd::h_result `h_result`. + /// @param h_result xtd::h_result error code to create error code for. /// @return Error code corresponding to `h_result`. /// @par Namespace /// xtd diff --git a/src/xtd.core/include/xtd/h_results b/src/xtd.core/include/xtd/h_results deleted file mode 100644 index c95ed7320f4..00000000000 --- a/src/xtd.core/include/xtd/h_results +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "h_results.h" diff --git a/src/xtd.core/include/xtd/h_results_category b/src/xtd.core/include/xtd/h_results_category deleted file mode 100644 index 0fbddd98259..00000000000 --- a/src/xtd.core/include/xtd/h_results_category +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "h_results_category.h" diff --git a/src/xtd.core/include/xtd/rank_exception.h b/src/xtd.core/include/xtd/rank_exception.h index bbcfa8531c7..f5126cec191 100644 --- a/src/xtd.core/include/xtd/rank_exception.h +++ b/src/xtd.core/include/xtd/rank_exception.h @@ -87,6 +87,6 @@ namespace xtd { private: const char* default_message() const noexcept {return "Attempted to operate on an array with the incorrect number of dimensions."_t;} - const std::error_code default_error() const noexcept {return {h_results::COR_E_RANK, h_results::h_results_category()};} + const std::error_code default_error() const noexcept {return {h_result::COR_E_RANK, h_result::h_result_category()};} }; } diff --git a/src/xtd.core/include/xtd/system_exception.h b/src/xtd.core/include/xtd/system_exception.h index 5eb0b0285c7..2b511b87100 100644 --- a/src/xtd.core/include/xtd/system_exception.h +++ b/src/xtd.core/include/xtd/system_exception.h @@ -33,7 +33,7 @@ namespace xtd { /// @param inner_exception The exception that is the cause of the current exception. /// @param stack_frame (optional) Contains current information about member name, file path and line number in the file where the exception is occurred. Typically #current_stack_frame_. template - system_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : exception(message, inner_exception, stack_frame) {error_code(h_results::make_error_code(h_results::COR_E_SYSTEM));} + system_exception(const std::optional& message, const exception_t& inner_exception, const xtd::diagnostics::stack_frame& stack_frame = xtd::diagnostics::stack_frame::empty()) : exception(message, inner_exception, stack_frame) {error_code(h_result::make_error_code(h_result::COR_E_SYSTEM));} /// @brief Create a new instance of class system_exception /// @param message Message string associate to the exception. diff --git a/src/xtd.core/include/xtd/xtd.core.h b/src/xtd.core/include/xtd/xtd.core.h index fb8d229ed5c..a45fa2a9def 100644 --- a/src/xtd.core/include/xtd/xtd.core.h +++ b/src/xtd.core/include/xtd/xtd.core.h @@ -327,8 +327,8 @@ #include "get_out_rdbuf.h" #include "guid.h" #include "hash_code.h" -#include "h_results.h" -#include "h_results_category.h" +#include "h_result.h" +#include "h_result_category.h" #include "iasync_result.h" #include "iclonable.h" #include "icomparable.h" diff --git a/src/xtd.core/src/xtd/access_violation_exception.cpp b/src/xtd.core/src/xtd/access_violation_exception.cpp index 68be297dc41..435009432a4 100644 --- a/src/xtd.core/src/xtd/access_violation_exception.cpp +++ b/src/xtd.core/src/xtd/access_violation_exception.cpp @@ -5,11 +5,11 @@ using namespace xtd; using namespace xtd::diagnostics; access_violation_exception::access_violation_exception(const stack_frame& stack_frame) : system_exception(std::nullopt, stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); } access_violation_exception::access_violation_exception(const std::optional& message, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); } access_violation_exception::access_violation_exception(const xtd::string& message, const std::error_code& error, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { @@ -17,7 +17,7 @@ access_violation_exception::access_violation_exception(const xtd::string& messag } access_violation_exception::access_violation_exception(const xtd::string& message, const xtd::string& help_link, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); this->help_link(help_link); } @@ -27,11 +27,11 @@ access_violation_exception::access_violation_exception(const xtd::string& messag } access_violation_exception::access_violation_exception(const std::exception& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); } access_violation_exception::access_violation_exception(const xtd::string& message, const std::exception& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); } access_violation_exception::access_violation_exception(const xtd::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { @@ -39,7 +39,7 @@ access_violation_exception::access_violation_exception(const xtd::string& messag } access_violation_exception::access_violation_exception(const xtd::string& message, const std::exception& inner_exception, const xtd::string& help_link, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::E_POINTER)); + error_code(h_result::make_error_code(h_result::E_POINTER)); this->help_link(help_link); } diff --git a/src/xtd.core/src/xtd/collections/key_not_found_exception.cpp b/src/xtd.core/src/xtd/collections/key_not_found_exception.cpp index bf898efae10..d6912f5da12 100644 --- a/src/xtd.core/src/xtd/collections/key_not_found_exception.cpp +++ b/src/xtd.core/src/xtd/collections/key_not_found_exception.cpp @@ -6,11 +6,11 @@ using namespace xtd::collections; using namespace xtd::diagnostics; key_not_found_exception::key_not_found_exception(const stack_frame& stack_frame) : system_exception(std::nullopt, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); } key_not_found_exception::key_not_found_exception(const std::optional& message, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); } key_not_found_exception::key_not_found_exception(const xtd::string& message, const std::error_code& error, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { @@ -18,7 +18,7 @@ key_not_found_exception::key_not_found_exception(const xtd::string& message, con } key_not_found_exception::key_not_found_exception(const xtd::string& message, const xtd::string& help_link, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); this->help_link(help_link); } @@ -28,11 +28,11 @@ key_not_found_exception::key_not_found_exception(const xtd::string& message, con } key_not_found_exception::key_not_found_exception(const std::exception& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); } key_not_found_exception::key_not_found_exception(const xtd::string& message, const std::exception& inner_exception, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); } key_not_found_exception::key_not_found_exception(const xtd::string& message, const std::exception& inner_exception, const std::error_code& error, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { @@ -40,7 +40,7 @@ key_not_found_exception::key_not_found_exception(const xtd::string& message, con } key_not_found_exception::key_not_found_exception(const xtd::string& message, const std::exception& inner_exception, const xtd::string& help_link, const xtd::diagnostics::stack_frame& stack_frame) : system_exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_KEYNOTFOUND)); + error_code(h_result::make_error_code(h_result::COR_E_KEYNOTFOUND)); this->help_link(help_link); } diff --git a/src/xtd.core/src/xtd/exception.cpp b/src/xtd.core/src/xtd/exception.cpp index 8313683a7bd..2f5d7acd5eb 100644 --- a/src/xtd.core/src/xtd/exception.cpp +++ b/src/xtd.core/src/xtd/exception.cpp @@ -2,8 +2,8 @@ #include "../../include/xtd/console.h" #include "../../include/xtd/environment.h" #include "../../include/xtd/exception.h" -#include "../../include/xtd/h_results.h" -#include "../../include/xtd/h_results_category.h" +#include "../../include/xtd/h_result.h" +#include "../../include/xtd/h_result_category.h" #include "../../include/xtd/diagnostics/stack_trace.h" #include "../../include/xtd/io/path.h" #include "../../include/xtd/reflection/assembly.h" @@ -20,7 +20,7 @@ struct exception::data { std::optional message; uptr inner_exception; exception_ref inner_exception_deprecated; - std::error_code error = h_results::make_error_code(h_results::COR_E_EXCEPTION); + std::error_code error = h_result::make_error_code(h_result::COR_E_EXCEPTION); string help_link; string source = io::path::get_file_name(reflection::assembly::get_executing_assembly().location()); diagnostics::stack_frame stack_frame; @@ -51,12 +51,12 @@ void exception::help_link(const xtd::string& value) noexcept { } int32 exception::h_result() const noexcept { - if (data_->error.category() != h_results::h_results_category()) return h_results::COR_E_EXCEPTION; + if (data_->error.category() != h_result::h_result_category()) return h_result::COR_E_EXCEPTION; return data_->error.value(); } void exception::h_result(int32 value) noexcept { - if (data_->error.value() == value && data_->error.category() == h_results::h_results_category()) return; + if (data_->error.value() == value && data_->error.category() == h_result::h_result_category()) return; data_->error = make_error_code(value); } diff --git a/src/xtd.core/src/xtd/h_result.cpp b/src/xtd.core/src/xtd/h_result.cpp new file mode 100644 index 00000000000..9f6dc035e6f --- /dev/null +++ b/src/xtd.core/src/xtd/h_result.cpp @@ -0,0 +1,43 @@ +#include "../../include/xtd/h_result.h" +#include "../../include/xtd/literals.h" +#include "../../include/xtd/uint32.h" + +using namespace xtd; + +const std::error_category& h_result::h_result_category() noexcept { + class h_result_category : public std::error_category { + public: + const char* name() const noexcept override{return "h_result_category";} + + std::string message(int h_result) const override { + switch (h_result) { + case h_result::S_OK: return "Operation successful."; + case h_result::S_FALSE: return "Operation successful but returned no results."; + case h_result::COR_E_ABANDONEDMUTEX: return "The wait completed due to an abandoned mutex."; + case h_result::COR_E_AMBIGUOUSIMPLEMENTATION: return "Ambiguous implementation found."; + case h_result::COR_E_AMBIGUOUSMATCH: return "Ambiguous match found."; + case h_result::COR_E_APPDOMAINUNLOADED: return "Attempted to access an unloaded AppDomain."; + case h_result::COR_E_APPLICATION: return "Error in the application."; + case h_result::COR_E_ARGUMENT: return "Value does not fall within the expected range."; + case h_result::COR_E_ARGUMENTOUTOFRANGE: return "Specified argument was out of the range of valid values."; + case h_result::COR_E_ARITHMETIC : return "Overflow or underflow in the arithmetic operation."; + case h_result::COR_E_ARRAYTYPEMISMATCH : return "Attempted to access an element as a type incompatible with the array."; + case h_result::COR_E_BADEXEFORMAT: return "Format of the executable (.exe) cannot be run."_t; + case h_result::COR_E_BADIMAGEFORMAT: return "Format of the executable (.exe) or library (.dll) is invalid."_t; + case h_result::COR_E_CANNOTUNLOADAPPDOMAIN: return "Attempt to unload the AppDomain failed."_t; + case h_result::COR_E_EXCEPTION: return "Exception of type 'xtd::exception' was thrown."_t; + case h_result::COR_E_RANK: return "Attempted to operate on an array with the incorrect number of dimensions."_t; + case h_result::COR_E_SYSTEM: return "System error."_t; + case h_result::E_POINTER: return "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."_t; + default: return string::format("Exception error 0x{0:X8} ({0})", static_cast(h_result)); + } + } + }; + + static auto result = h_result_category {}; + return result; +} + +std::error_code h_result::make_error_code(int h_result) noexcept { + return std::error_code {h_result, h_result_category()}; +} diff --git a/src/xtd.core/src/xtd/h_result_category.cpp b/src/xtd.core/src/xtd/h_result_category.cpp new file mode 100644 index 00000000000..699344090da --- /dev/null +++ b/src/xtd.core/src/xtd/h_result_category.cpp @@ -0,0 +1,12 @@ +#include "../../include/xtd/h_result_category.h" +#include "../../include/xtd/h_result.h" + +using namespace xtd; + +const std::error_category& xtd::h_result_category() noexcept { + return xtd::h_result::h_result_category(); +} + +std::error_code xtd::make_error_code(int h_result) noexcept { + return xtd::h_result::make_error_code(h_result); +} diff --git a/src/xtd.core/src/xtd/h_results_category.cpp b/src/xtd.core/src/xtd/h_results_category.cpp deleted file mode 100644 index 5063d61561e..00000000000 --- a/src/xtd.core/src/xtd/h_results_category.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "../../include/xtd/h_results_category.h" -#include "../../include/xtd/h_results.h" -#include "../../include/xtd/literals.h" -#include "../../include/xtd/uint32.h" - -using namespace xtd; - -const std::error_category& xtd::h_results_category() noexcept { - class h_results_category : public std::error_category { - public: - const char* name() const noexcept override{return "h_results_category";} - - std::string message(int h_result) const override { - switch (h_result) { - case h_results::S_OK: return "Operation successful."; - case h_results::S_FALSE: return "Operation successful but returned no results."; - case h_results::COR_E_ABANDONEDMUTEX: return "The wait completed due to an abandoned mutex."; - case h_results::COR_E_AMBIGUOUSIMPLEMENTATION: return "Ambiguous implementation found."; - case h_results::COR_E_AMBIGUOUSMATCH: return "Ambiguous match found."; - case h_results::COR_E_APPDOMAINUNLOADED: return "Attempted to access an unloaded AppDomain."; - case h_results::COR_E_APPLICATION: return "Error in the application."; - case h_results::COR_E_ARGUMENT: return "Value does not fall within the expected range."; - case h_results::COR_E_ARGUMENTOUTOFRANGE: return "Specified argument was out of the range of valid values."; - case h_results::COR_E_ARITHMETIC : return "Overflow or underflow in the arithmetic operation."; - case h_results::COR_E_ARRAYTYPEMISMATCH : return "Attempted to access an element as a type incompatible with the array."; - case h_results::COR_E_BADEXEFORMAT: return "Format of the executable (.exe) cannot be run."_t; - case h_results::COR_E_BADIMAGEFORMAT: return "Format of the executable (.exe) or library (.dll) is invalid."_t; - case h_results::COR_E_CANNOTUNLOADAPPDOMAIN: return "Attempt to unload the AppDomain failed."_t; - case h_results::COR_E_EXCEPTION: return "Exception of type 'xtd::exception' was thrown."_t; - case h_results::COR_E_RANK: return "Attempted to operate on an array with the incorrect number of dimensions."_t; - case h_results::COR_E_SYSTEM: return "System error."_t; - case h_results::E_POINTER: return "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."_t; - default: return string::format("Exception error 0x{0:X8} ({0})", static_cast(h_result)); - } - } - }; - - static auto result = h_results_category {}; - return result; -} - -std::error_code xtd::make_error_code(int h_result) noexcept { - return std::error_code {h_result, h_results_category()}; -} diff --git a/src/xtd.core/src/xtd/system_exception.cpp b/src/xtd.core/src/xtd/system_exception.cpp index 8e869bfb4af..37456593e1b 100644 --- a/src/xtd.core/src/xtd/system_exception.cpp +++ b/src/xtd.core/src/xtd/system_exception.cpp @@ -8,11 +8,11 @@ using namespace xtd; using namespace xtd::diagnostics; system_exception::system_exception(const stack_frame& stack_frame) : exception(stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); } system_exception::system_exception(const optional& message, const stack_frame& stack_frame) : exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); } system_exception::system_exception(const string& message, const std::error_code& error, const stack_frame& stack_frame) : exception(message, stack_frame) { @@ -20,7 +20,7 @@ system_exception::system_exception(const string& message, const std::error_code& } system_exception::system_exception(const string& message, const string& help_link, const stack_frame& stack_frame) : exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); this->help_link(help_link); } @@ -30,11 +30,11 @@ system_exception::system_exception(const string& message, const std::error_code& } system_exception::system_exception(const std::exception& inner_exception, const stack_frame& stack_frame) : exception(default_message(), stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); } system_exception::system_exception(const string& message, const std::exception& inner_exception, const stack_frame& stack_frame) : exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); } system_exception::system_exception(const string& message, const std::exception& inner_exception, const std::error_code& error, const stack_frame& stack_frame) : exception(message, stack_frame) { @@ -42,7 +42,7 @@ system_exception::system_exception(const string& message, const std::exception& } system_exception::system_exception(const string& message, const std::exception& inner_exception, const string& help_link, const stack_frame& stack_frame) : exception(message, stack_frame) { - error_code(h_results::make_error_code(h_results::COR_E_SYSTEM)); + error_code(h_result::make_error_code(h_result::COR_E_SYSTEM)); this->help_link(help_link); } diff --git a/tests/xtd.core.unit_tests/CMakeLists.txt b/tests/xtd.core.unit_tests/CMakeLists.txt index fd77c3dc374..440fe868c2d 100644 --- a/tests/xtd.core.unit_tests/CMakeLists.txt +++ b/tests/xtd.core.unit_tests/CMakeLists.txt @@ -141,7 +141,7 @@ add_sources( src/xtd/tests/generic_stream_output_tests.cpp src/xtd/tests/get_know_folder_path.h src/xtd/tests/guid_tests.cpp - src/xtd/tests/h_results_tests.cpp + src/xtd/tests/h_result_tests.cpp src/xtd/tests/iasync_result_tests.cpp src/xtd/tests/icomparable_tests.cpp src/xtd/tests/iequatable_tests.cpp diff --git a/tests/xtd.core.unit_tests/src/xtd/tests/exception_tests.cpp b/tests/xtd.core.unit_tests/src/xtd/tests/exception_tests.cpp index 48543fdf752..8f21b4eac54 100644 --- a/tests/xtd.core.unit_tests/src/xtd/tests/exception_tests.cpp +++ b/tests/xtd.core.unit_tests/src/xtd/tests/exception_tests.cpp @@ -24,11 +24,11 @@ namespace xtd::tests { void test_method_(default_creator) { auto e = exception {}; - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); assert::is_empty(e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); assert::are_equal(0u, e.line_number(), csf_); assert::is_empty(e.member_name(), csf_); assert::are_equal("Exception of type 'xtd::exception' was thrown.", e.message(), csf_); @@ -41,11 +41,11 @@ namespace xtd::tests { void test_method_(default_creator_with_current_stack_frame) { auto info = current_stack_frame_; exception e = exception(info); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); assert::are_equal(info.get_file_line_number(), e.line_number(), csf_); assert::are_equal(info.get_method(), e.member_name(), csf_); assert::are_equal("Exception of type 'xtd::exception' was thrown.", e.message(), csf_); @@ -57,8 +57,8 @@ namespace xtd::tests { void test_method_(creator_with_empty_message) { exception e = exception(""); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::is_empty(e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); @@ -76,9 +76,9 @@ namespace xtd::tests { exception e = exception("", info); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::are_equal(info.get_file_line_number(), e.line_number(), csf_); assert::are_equal(info.get_method(), e.member_name(), csf_); assert::is_empty(e.message(), csf_); @@ -90,8 +90,8 @@ namespace xtd::tests { void test_method_(creator_with_message) { exception e = exception("Test excpetion message."); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::is_empty(e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); @@ -109,9 +109,9 @@ namespace xtd::tests { exception e = exception("Test excpetion message.", info); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); //assert::is_false(e.inner_exception().has_value(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::are_equal(info.get_file_line_number(), e.line_number(), csf_); assert::are_equal(info.get_method(), e.member_name(), csf_); assert::are_equal("Test excpetion message.", e.message(), csf_); @@ -124,8 +124,8 @@ namespace xtd::tests { void test_method_(creator_with_message_and_inner_exception) { auto inner_exception = argument_exception {}; exception e = exception("Test excpetion message.", inner_exception); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::is_empty(e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); //assert::is_instance_of(e.inner_exception().value().get(), csf_); @@ -145,10 +145,10 @@ namespace xtd::tests { auto e = exception("Test excpetion message.", inner_exception, info); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); //assert::is_instance_of(e.inner_exception().value().get(), csf_); //assert::are_equal(inner_exception.what(), e.inner_exception().value().get().what(), csf_); - assert::are_equal(h_results::h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::are_equal(info.get_file_line_number(), e.line_number(), csf_); assert::are_equal(info.get_method(), e.member_name(), csf_); assert::are_equal("Test excpetion message.", e.message(), csf_); @@ -162,8 +162,8 @@ namespace xtd::tests { auto inner_exception = argument_exception {}; auto info = current_stack_frame_; auto e = exception("Test excpetion message.", inner_exception, info); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); - assert::are_equal(h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); //assert::is_instance_of(e.inner_exception().value().get(), csf_); @@ -182,8 +182,8 @@ namespace xtd::tests { auto info = current_stack_frame_; auto e = exception {}; e = exception("Test excpetion message.", inner_exception, info); - assert::are_equal(h_results::COR_E_EXCEPTION, e.error_code().value(), csf_); - assert::are_equal(h_results_category(), e.error_code().category(), csf_); + assert::are_equal(h_result::COR_E_EXCEPTION, e.error_code().value(), csf_); + assert::are_equal(h_result::h_result_category(), e.error_code().category(), csf_); assert::are_equal(info.get_file_name(), e.file_path(), csf_); assert::is_empty(e.help_link(), csf_); //assert::is_instance_of(e.inner_exception().value().get(), csf_); diff --git a/tests/xtd.core.unit_tests/src/xtd/tests/get_know_folder_path.h b/tests/xtd.core.unit_tests/src/xtd/tests/get_know_folder_path.h index ca88e1b33b6..e354d58986d 100644 --- a/tests/xtd.core.unit_tests/src/xtd/tests/get_know_folder_path.h +++ b/tests/xtd.core.unit_tests/src/xtd/tests/get_know_folder_path.h @@ -27,7 +27,7 @@ inline xtd::string __get_know_folder_path__(xtd::int32 id) { return __get_environment_variable__("HOMEPATH"); DWORD path_size = 65535; std::wstring path(path_size, 0); - return SHGetFolderPath(nullptr, id, nullptr, SHGFP_TYPE_CURRENT, path.data()) == xtd::h_results::S_OK ? path.data() : L""; + return SHGetFolderPath(nullptr, id, nullptr, SHGFP_TYPE_CURRENT, path.data()) == xtd::h_result::S_OK ? path.data() : L""; } #else #include diff --git a/tests/xtd.core.unit_tests/src/xtd/tests/h_results_tests.cpp b/tests/xtd.core.unit_tests/src/xtd/tests/h_result_tests.cpp similarity index 79% rename from tests/xtd.core.unit_tests/src/xtd/tests/h_results_tests.cpp rename to tests/xtd.core.unit_tests/src/xtd/tests/h_result_tests.cpp index d6525714731..2d00fafc4c2 100644 --- a/tests/xtd.core.unit_tests/src/xtd/tests/h_results_tests.cpp +++ b/tests/xtd.core.unit_tests/src/xtd/tests/h_result_tests.cpp @@ -9,465 +9,465 @@ using namespace xtd; using namespace xtd::tunit; namespace xtd::tests { - class test_class_(h_results_tests) { + class test_class_(h_result_tests) { void test_method_(S_OK) { - assert::are_equal(static_cast(0x00000000), h_results::S_OK, csf_); + assert::are_equal(static_cast(0x00000000), h_result::S_OK, csf_); } void test_method_(S_FALSE) { - assert::are_equal(static_cast(0x00000001), h_results::S_FALSE, csf_); + assert::are_equal(static_cast(0x00000001), h_result::S_FALSE, csf_); } void test_method_(COR_E_ABANDONEDMUTEX) { - assert::are_equal(static_cast(0x8013152D), h_results::COR_E_ABANDONEDMUTEX, csf_); + assert::are_equal(static_cast(0x8013152D), h_result::COR_E_ABANDONEDMUTEX, csf_); } void test_method_(COR_E_AMBIGUOUSIMPLEMENTATION) { - assert::are_equal(static_cast(0x8013106A), h_results::COR_E_AMBIGUOUSIMPLEMENTATION, csf_); + assert::are_equal(static_cast(0x8013106A), h_result::COR_E_AMBIGUOUSIMPLEMENTATION, csf_); } void test_method_(COR_E_AMBIGUOUSMATCH) { - assert::are_equal(static_cast(0x8000211D), h_results::COR_E_AMBIGUOUSMATCH, csf_); + assert::are_equal(static_cast(0x8000211D), h_result::COR_E_AMBIGUOUSMATCH, csf_); } void test_method_(COR_E_APPDOMAINUNLOADED) { - assert::are_equal(static_cast(0x80131014), h_results::COR_E_APPDOMAINUNLOADED, csf_); + assert::are_equal(static_cast(0x80131014), h_result::COR_E_APPDOMAINUNLOADED, csf_); } void test_method_(COR_E_APPLICATION) { - assert::are_equal(static_cast(0x80131600), h_results::COR_E_APPLICATION, csf_); + assert::are_equal(static_cast(0x80131600), h_result::COR_E_APPLICATION, csf_); } void test_method_(COR_E_ARGUMENT) { - assert::are_equal(static_cast(0x80070057), h_results::COR_E_ARGUMENT, csf_); + assert::are_equal(static_cast(0x80070057), h_result::COR_E_ARGUMENT, csf_); } void test_method_(COR_E_ARGUMENTOUTOFRANGE) { - assert::are_equal(static_cast(0x80131502), h_results::COR_E_ARGUMENTOUTOFRANGE, csf_); + assert::are_equal(static_cast(0x80131502), h_result::COR_E_ARGUMENTOUTOFRANGE, csf_); } void test_method_(COR_E_ARITHMETIC) { - assert::are_equal(static_cast(0x80070216), h_results::COR_E_ARITHMETIC, csf_); + assert::are_equal(static_cast(0x80070216), h_result::COR_E_ARITHMETIC, csf_); } void test_method_(COR_E_ARRAYTYPEMISMATCH) { - assert::are_equal(static_cast(0x80131503), h_results::COR_E_ARRAYTYPEMISMATCH, csf_); + assert::are_equal(static_cast(0x80131503), h_result::COR_E_ARRAYTYPEMISMATCH, csf_); } void test_method_(COR_E_BADEXEFORMAT) { - assert::are_equal(static_cast(0x800700C1), h_results::COR_E_BADEXEFORMAT, csf_); + assert::are_equal(static_cast(0x800700C1), h_result::COR_E_BADEXEFORMAT, csf_); } void test_method_(COR_E_BADIMAGEFORMAT) { - assert::are_equal(static_cast(0x8007000B), h_results::COR_E_BADIMAGEFORMAT, csf_); + assert::are_equal(static_cast(0x8007000B), h_result::COR_E_BADIMAGEFORMAT, csf_); } void test_method_(COR_E_CANNOTUNLOADAPPDOMAIN) { - assert::are_equal(static_cast(0x80131015), h_results::COR_E_CANNOTUNLOADAPPDOMAIN, csf_); + assert::are_equal(static_cast(0x80131015), h_result::COR_E_CANNOTUNLOADAPPDOMAIN, csf_); } void test_method_(COR_E_CODECONTRACTFAILED) { - assert::are_equal(static_cast(0x80131542), h_results::COR_E_CODECONTRACTFAILED, csf_); + assert::are_equal(static_cast(0x80131542), h_result::COR_E_CODECONTRACTFAILED, csf_); } void test_method_(COR_E_CONTEXTMARSHAL) { - assert::are_equal(static_cast(0x80131504), h_results::COR_E_CONTEXTMARSHAL, csf_); + assert::are_equal(static_cast(0x80131504), h_result::COR_E_CONTEXTMARSHAL, csf_); } void test_method_(COR_E_CUSTOMATTRIBUTEFORMAT) { - assert::are_equal(static_cast(0x80131605), h_results::COR_E_CUSTOMATTRIBUTEFORMAT, csf_); + assert::are_equal(static_cast(0x80131605), h_result::COR_E_CUSTOMATTRIBUTEFORMAT, csf_); } void test_method_(COR_E_DATAMISALIGNED) { - assert::are_equal(static_cast(0x80131541), h_results::COR_E_DATAMISALIGNED, csf_); + assert::are_equal(static_cast(0x80131541), h_result::COR_E_DATAMISALIGNED, csf_); } void test_method_(COR_E_DIRECTORYNOTFOUND) { - assert::are_equal(static_cast(0x80070003), h_results::COR_E_DIRECTORYNOTFOUND, csf_); + assert::are_equal(static_cast(0x80070003), h_result::COR_E_DIRECTORYNOTFOUND, csf_); } void test_method_(COR_E_DIVIDEBYZERO) { - assert::are_equal(static_cast(0x80020012), h_results::COR_E_DIVIDEBYZERO, csf_); + assert::are_equal(static_cast(0x80020012), h_result::COR_E_DIVIDEBYZERO, csf_); } void test_method_(COR_E_DLLNOTFOUND) { - assert::are_equal(static_cast(0x80131524), h_results::COR_E_DLLNOTFOUND, csf_); + assert::are_equal(static_cast(0x80131524), h_result::COR_E_DLLNOTFOUND, csf_); } void test_method_(COR_E_DUPLICATEWAITOBJECT) { - assert::are_equal(static_cast(0x80131529), h_results::COR_E_DUPLICATEWAITOBJECT, csf_); + assert::are_equal(static_cast(0x80131529), h_result::COR_E_DUPLICATEWAITOBJECT, csf_); } void test_method_(COR_E_ENDOFSTREAM) { - assert::are_equal(static_cast(0x80070026), h_results::COR_E_ENDOFSTREAM, csf_); + assert::are_equal(static_cast(0x80070026), h_result::COR_E_ENDOFSTREAM, csf_); } void test_method_(COR_E_ENTRYPOINTNOTFOUND) { - assert::are_equal(static_cast(0x80131523), h_results::COR_E_ENTRYPOINTNOTFOUND, csf_); + assert::are_equal(static_cast(0x80131523), h_result::COR_E_ENTRYPOINTNOTFOUND, csf_); } void test_method_(COR_E_EXCEPTION) { - assert::are_equal(static_cast(0x80131500), h_results::COR_E_EXCEPTION, csf_); + assert::are_equal(static_cast(0x80131500), h_result::COR_E_EXCEPTION, csf_); } void test_method_(COR_E_EXECUTIONENGINE) { - assert::are_equal(static_cast(0x80131506), h_results::COR_E_EXECUTIONENGINE, csf_); + assert::are_equal(static_cast(0x80131506), h_result::COR_E_EXECUTIONENGINE, csf_); } void test_method_(COR_E_FAILFAST) { - assert::are_equal(static_cast(0x80131623), h_results::COR_E_FAILFAST, csf_); + assert::are_equal(static_cast(0x80131623), h_result::COR_E_FAILFAST, csf_); } void test_method_(COR_E_FIELDACCESS) { - assert::are_equal(static_cast(0x80131507), h_results::COR_E_FIELDACCESS, csf_); + assert::are_equal(static_cast(0x80131507), h_result::COR_E_FIELDACCESS, csf_); } void test_method_(COR_E_FILELOAD) { - assert::are_equal(static_cast(0x80131621), h_results::COR_E_FILELOAD, csf_); + assert::are_equal(static_cast(0x80131621), h_result::COR_E_FILELOAD, csf_); } void test_method_(COR_E_FILENOTFOUND) { - assert::are_equal(static_cast(0x80070002), h_results::COR_E_FILENOTFOUND, csf_); + assert::are_equal(static_cast(0x80070002), h_result::COR_E_FILENOTFOUND, csf_); } void test_method_(COR_E_FORMAT) { - assert::are_equal(static_cast(0x80131537), h_results::COR_E_FORMAT, csf_); + assert::are_equal(static_cast(0x80131537), h_result::COR_E_FORMAT, csf_); } void test_method_(COR_E_INDEXOUTOFRANGE) { - assert::are_equal(static_cast(0x80131508), h_results::COR_E_INDEXOUTOFRANGE, csf_); + assert::are_equal(static_cast(0x80131508), h_result::COR_E_INDEXOUTOFRANGE, csf_); } void test_method_(COR_E_INSUFFICIENTEXECUTIONSTACK) { - assert::are_equal(static_cast(0x80131578), h_results::COR_E_INSUFFICIENTEXECUTIONSTACK, csf_); + assert::are_equal(static_cast(0x80131578), h_result::COR_E_INSUFFICIENTEXECUTIONSTACK, csf_); } void test_method_(COR_E_INSUFFICIENTMEMORY) { - assert::are_equal(static_cast(0x8013153D), h_results::COR_E_INSUFFICIENTMEMORY, csf_); + assert::are_equal(static_cast(0x8013153D), h_result::COR_E_INSUFFICIENTMEMORY, csf_); } void test_method_(COR_E_INVALIDCAST) { - assert::are_equal(static_cast(0x80004002), h_results::COR_E_INVALIDCAST, csf_); + assert::are_equal(static_cast(0x80004002), h_result::COR_E_INVALIDCAST, csf_); } void test_method_(COR_E_INVALIDCOMOBJECT) { - assert::are_equal(static_cast(0x80131527), h_results::COR_E_INVALIDCOMOBJECT, csf_); + assert::are_equal(static_cast(0x80131527), h_result::COR_E_INVALIDCOMOBJECT, csf_); } void test_method_(COR_E_INVALIDFILTERCRITERIA) { - assert::are_equal(static_cast(0x80131601), h_results::COR_E_INVALIDFILTERCRITERIA, csf_); + assert::are_equal(static_cast(0x80131601), h_result::COR_E_INVALIDFILTERCRITERIA, csf_); } void test_method_(COR_E_INVALIDOLEVARIANTTYPE) { - assert::are_equal(static_cast(0x80131531), h_results::COR_E_INVALIDOLEVARIANTTYPE, csf_); + assert::are_equal(static_cast(0x80131531), h_result::COR_E_INVALIDOLEVARIANTTYPE, csf_); } void test_method_(COR_E_INVALIDOPERATION) { - assert::are_equal(static_cast(0x80131509), h_results::COR_E_INVALIDOPERATION, csf_); + assert::are_equal(static_cast(0x80131509), h_result::COR_E_INVALIDOPERATION, csf_); } void test_method_(COR_E_INVALIDPROGRAM) { - assert::are_equal(static_cast(0x8013153A), h_results::COR_E_INVALIDPROGRAM, csf_); + assert::are_equal(static_cast(0x8013153A), h_result::COR_E_INVALIDPROGRAM, csf_); } void test_method_(COR_E_IO) { - assert::are_equal(static_cast(0x80131620), h_results::COR_E_IO, csf_); + assert::are_equal(static_cast(0x80131620), h_result::COR_E_IO, csf_); } void test_method_(COR_E_KEYNOTFOUND) { - assert::are_equal(static_cast(0x80131577), h_results::COR_E_KEYNOTFOUND, csf_); + assert::are_equal(static_cast(0x80131577), h_result::COR_E_KEYNOTFOUND, csf_); } void test_method_(COR_E_MARSHALDIRECTIVE) { - assert::are_equal(static_cast(0x80131535), h_results::COR_E_MARSHALDIRECTIVE, csf_); + assert::are_equal(static_cast(0x80131535), h_result::COR_E_MARSHALDIRECTIVE, csf_); } void test_method_(COR_E_MEMBERACCESS) { - assert::are_equal(static_cast(0x8013151A), h_results::COR_E_MEMBERACCESS, csf_); + assert::are_equal(static_cast(0x8013151A), h_result::COR_E_MEMBERACCESS, csf_); } void test_method_(COR_E_METHODACCESS) { - assert::are_equal(static_cast(0x80131510), h_results::COR_E_METHODACCESS, csf_); + assert::are_equal(static_cast(0x80131510), h_result::COR_E_METHODACCESS, csf_); } void test_method_(COR_E_MISSINGFIELD) { - assert::are_equal(static_cast(0x80131511), h_results::COR_E_MISSINGFIELD, csf_); + assert::are_equal(static_cast(0x80131511), h_result::COR_E_MISSINGFIELD, csf_); } void test_method_(COR_E_MISSINGMANIFESTRESOURCE) { - assert::are_equal(static_cast(0x80131532), h_results::COR_E_MISSINGMANIFESTRESOURCE, csf_); + assert::are_equal(static_cast(0x80131532), h_result::COR_E_MISSINGMANIFESTRESOURCE, csf_); } void test_method_(COR_E_MISSINGMEMBER) { - assert::are_equal(static_cast(0x80131512), h_results::COR_E_MISSINGMEMBER, csf_); + assert::are_equal(static_cast(0x80131512), h_result::COR_E_MISSINGMEMBER, csf_); } void test_method_(COR_E_MISSINGMETHOD) { - assert::are_equal(static_cast(0x80131513), h_results::COR_E_MISSINGMETHOD, csf_); + assert::are_equal(static_cast(0x80131513), h_result::COR_E_MISSINGMETHOD, csf_); } void test_method_(COR_E_MISSINGSATELLITEASSEMBLY) { - assert::are_equal(static_cast(0x80131536), h_results::COR_E_MISSINGSATELLITEASSEMBLY, csf_); + assert::are_equal(static_cast(0x80131536), h_result::COR_E_MISSINGSATELLITEASSEMBLY, csf_); } void test_method_(COR_E_MULTICASTNOTSUPPORTED) { - assert::are_equal(static_cast(0x80131514), h_results::COR_E_MULTICASTNOTSUPPORTED, csf_); + assert::are_equal(static_cast(0x80131514), h_result::COR_E_MULTICASTNOTSUPPORTED, csf_); } void test_method_(COR_E_NOTFINITENUMBER) { - assert::are_equal(static_cast(0x80131528), h_results::COR_E_NOTFINITENUMBER, csf_); + assert::are_equal(static_cast(0x80131528), h_result::COR_E_NOTFINITENUMBER, csf_); } void test_method_(COR_E_NOTSUPPORTED) { - assert::are_equal(static_cast(0x80131515), h_results::COR_E_NOTSUPPORTED, csf_); + assert::are_equal(static_cast(0x80131515), h_result::COR_E_NOTSUPPORTED, csf_); } void test_method_(COR_E_OBJECTDISPOSED) { - assert::are_equal(static_cast(0x80131622), h_results::COR_E_OBJECTDISPOSED, csf_); + assert::are_equal(static_cast(0x80131622), h_result::COR_E_OBJECTDISPOSED, csf_); } void test_method_(COR_E_OPERATIONCANCELED) { - assert::are_equal(static_cast(0x8013153B), h_results::COR_E_OPERATIONCANCELED, csf_); + assert::are_equal(static_cast(0x8013153B), h_result::COR_E_OPERATIONCANCELED, csf_); } void test_method_(COR_E_OUTOFMEMORY) { - assert::are_equal(static_cast(0x8007000E), h_results::COR_E_OUTOFMEMORY, csf_); + assert::are_equal(static_cast(0x8007000E), h_result::COR_E_OUTOFMEMORY, csf_); } void test_method_(COR_E_OVERFLOW) { - assert::are_equal(static_cast(0x80131516), h_results::COR_E_OVERFLOW, csf_); + assert::are_equal(static_cast(0x80131516), h_result::COR_E_OVERFLOW, csf_); } void test_method_(COR_E_PATHTOOLONG) { - assert::are_equal(static_cast(0x800700CE), h_results::COR_E_PATHTOOLONG, csf_); + assert::are_equal(static_cast(0x800700CE), h_result::COR_E_PATHTOOLONG, csf_); } void test_method_(COR_E_PLATFORMNOTSUPPORTED) { - assert::are_equal(static_cast(0x80131539), h_results::COR_E_PLATFORMNOTSUPPORTED, csf_); + assert::are_equal(static_cast(0x80131539), h_result::COR_E_PLATFORMNOTSUPPORTED, csf_); } void test_method_(COR_E_RANK) { - assert::are_equal(static_cast(0x80131517), h_results::COR_E_RANK, csf_); + assert::are_equal(static_cast(0x80131517), h_result::COR_E_RANK, csf_); } void test_method_(COR_E_REFLECTIONTYPELOAD) { - assert::are_equal(static_cast(0x80131602), h_results::COR_E_REFLECTIONTYPELOAD, csf_); + assert::are_equal(static_cast(0x80131602), h_result::COR_E_REFLECTIONTYPELOAD, csf_); } void test_method_(COR_E_RUNTIMEWRAPPED) { - assert::are_equal(static_cast(0x8013153E), h_results::COR_E_RUNTIMEWRAPPED, csf_); + assert::are_equal(static_cast(0x8013153E), h_result::COR_E_RUNTIMEWRAPPED, csf_); } void test_method_(COR_E_SAFEARRAYRANKMISMATCH) { - assert::are_equal(static_cast(0x80131538), h_results::COR_E_SAFEARRAYRANKMISMATCH, csf_); + assert::are_equal(static_cast(0x80131538), h_result::COR_E_SAFEARRAYRANKMISMATCH, csf_); } void test_method_(COR_E_SAFEARRAYTYPEMISMATCH) { - assert::are_equal(static_cast(0x80131533), h_results::COR_E_SAFEARRAYTYPEMISMATCH, csf_); + assert::are_equal(static_cast(0x80131533), h_result::COR_E_SAFEARRAYTYPEMISMATCH, csf_); } void test_method_(COR_E_SECURITY) { - assert::are_equal(static_cast(0x8013150A), h_results::COR_E_SECURITY, csf_); + assert::are_equal(static_cast(0x8013150A), h_result::COR_E_SECURITY, csf_); } void test_method_(COR_E_SERIALIZATION) { - assert::are_equal(static_cast(0x8013150C), h_results::COR_E_SERIALIZATION, csf_); + assert::are_equal(static_cast(0x8013150C), h_result::COR_E_SERIALIZATION, csf_); } void test_method_(COR_E_STACKOVERFLOW) { - assert::are_equal(static_cast(0x800703E9), h_results::COR_E_STACKOVERFLOW, csf_); + assert::are_equal(static_cast(0x800703E9), h_result::COR_E_STACKOVERFLOW, csf_); } void test_method_(COR_E_SYNCHRONIZATIONLOCK) { - assert::are_equal(static_cast(0x80131518), h_results::COR_E_SYNCHRONIZATIONLOCK, csf_); + assert::are_equal(static_cast(0x80131518), h_result::COR_E_SYNCHRONIZATIONLOCK, csf_); } void test_method_(COR_E_SYSTEM) { - assert::are_equal(static_cast(0x80131501), h_results::COR_E_SYSTEM, csf_); + assert::are_equal(static_cast(0x80131501), h_result::COR_E_SYSTEM, csf_); } void test_method_(COR_E_TARGET) { - assert::are_equal(static_cast(0x80131603), h_results::COR_E_TARGET, csf_); + assert::are_equal(static_cast(0x80131603), h_result::COR_E_TARGET, csf_); } void test_method_(COR_E_TARGETINVOCATION) { - assert::are_equal(static_cast(0x80131604), h_results::COR_E_TARGETINVOCATION, csf_); + assert::are_equal(static_cast(0x80131604), h_result::COR_E_TARGETINVOCATION, csf_); } void test_method_(COR_E_TARGETPARAMCOUNT) { - assert::are_equal(static_cast(0x8002000E), h_results::COR_E_TARGETPARAMCOUNT, csf_); + assert::are_equal(static_cast(0x8002000E), h_result::COR_E_TARGETPARAMCOUNT, csf_); } void test_method_(COR_E_THREADABORTED) { - assert::are_equal(static_cast(0x80131530), h_results::COR_E_THREADABORTED, csf_); + assert::are_equal(static_cast(0x80131530), h_result::COR_E_THREADABORTED, csf_); } void test_method_(COR_E_THREADINTERRUPTED) { - assert::are_equal(static_cast(0x80131519), h_results::COR_E_THREADINTERRUPTED, csf_); + assert::are_equal(static_cast(0x80131519), h_result::COR_E_THREADINTERRUPTED, csf_); } void test_method_(COR_E_THREADSTART) { - assert::are_equal(static_cast(0x80131525), h_results::COR_E_THREADSTART, csf_); + assert::are_equal(static_cast(0x80131525), h_result::COR_E_THREADSTART, csf_); } void test_method_(COR_E_THREADSTATE) { - assert::are_equal(static_cast(0x80131520), h_results::COR_E_THREADSTATE, csf_); + assert::are_equal(static_cast(0x80131520), h_result::COR_E_THREADSTATE, csf_); } void test_method_(COR_E_TIMEOUT) { - assert::are_equal(static_cast(0x80131505), h_results::COR_E_TIMEOUT, csf_); + assert::are_equal(static_cast(0x80131505), h_result::COR_E_TIMEOUT, csf_); } void test_method_(COR_E_TYPEACCESS) { - assert::are_equal(static_cast(0x80131543), h_results::COR_E_TYPEACCESS, csf_); + assert::are_equal(static_cast(0x80131543), h_result::COR_E_TYPEACCESS, csf_); } void test_method_(COR_E_TYPEINITIALIZATION) { - assert::are_equal(static_cast(0x80131534), h_results::COR_E_TYPEINITIALIZATION, csf_); + assert::are_equal(static_cast(0x80131534), h_result::COR_E_TYPEINITIALIZATION, csf_); } void test_method_(COR_E_TYPELOAD) { - assert::are_equal(static_cast(0x80131522), h_results::COR_E_TYPELOAD, csf_); + assert::are_equal(static_cast(0x80131522), h_result::COR_E_TYPELOAD, csf_); } void test_method_(COR_E_TYPEUNLOADED) { - assert::are_equal(static_cast(0x80131013), h_results::COR_E_TYPEUNLOADED, csf_); + assert::are_equal(static_cast(0x80131013), h_result::COR_E_TYPEUNLOADED, csf_); } void test_method_(COR_E_UNAUTHORIZEDACCESS) { - assert::are_equal(static_cast(0x80070005), h_results::COR_E_UNAUTHORIZEDACCESS, csf_); + assert::are_equal(static_cast(0x80070005), h_result::COR_E_UNAUTHORIZEDACCESS, csf_); } void test_method_(COR_E_VERIFICATION) { - assert::are_equal(static_cast(0x8013150D), h_results::COR_E_VERIFICATION, csf_); + assert::are_equal(static_cast(0x8013150D), h_result::COR_E_VERIFICATION, csf_); } void test_method_(COR_E_WAITHANDLECANNOTBEOPENED) { - assert::are_equal(static_cast(0x8013152C), h_results::COR_E_WAITHANDLECANNOTBEOPENED, csf_); + assert::are_equal(static_cast(0x8013152C), h_result::COR_E_WAITHANDLECANNOTBEOPENED, csf_); } void test_method_(CO_E_NOTINITIALIZED) { - assert::are_equal(static_cast(0x800401F0), h_results::CO_E_NOTINITIALIZED, csf_); + assert::are_equal(static_cast(0x800401F0), h_result::CO_E_NOTINITIALIZED, csf_); } void test_method_(DISP_E_OVERFLOW) { - assert::are_equal(static_cast(0x8002000A), h_results::DISP_E_OVERFLOW, csf_); + assert::are_equal(static_cast(0x8002000A), h_result::DISP_E_OVERFLOW, csf_); } void test_method_(E_ABORT) { - assert::are_equal(static_cast(0x80004004), h_results::E_ABORT, csf_); + assert::are_equal(static_cast(0x80004004), h_result::E_ABORT, csf_); } void test_method_(E_BOUNDS) { - assert::are_equal(static_cast(0x8000000B), h_results::E_BOUNDS, csf_); + assert::are_equal(static_cast(0x8000000B), h_result::E_BOUNDS, csf_); } void test_method_(E_CHANGED_STATE) { - assert::are_equal(static_cast(0x8000000C), h_results::E_CHANGED_STATE, csf_); + assert::are_equal(static_cast(0x8000000C), h_result::E_CHANGED_STATE, csf_); } void test_method_(E_FILENOTFOUND) { - assert::are_equal(static_cast(0x80070002), h_results::E_FILENOTFOUND, csf_); + assert::are_equal(static_cast(0x80070002), h_result::E_FILENOTFOUND, csf_); } void test_method_(E_FAIL) { - assert::are_equal(static_cast(0x80004005), h_results::E_FAIL, csf_); + assert::are_equal(static_cast(0x80004005), h_result::E_FAIL, csf_); } void test_method_(E_HANDLE) { - assert::are_equal(static_cast(0x80070006), h_results::E_HANDLE, csf_); + assert::are_equal(static_cast(0x80070006), h_result::E_HANDLE, csf_); } void test_method_(E_INVALIDARG) { - assert::are_equal(static_cast(0x80070057), h_results::E_INVALIDARG, csf_); + assert::are_equal(static_cast(0x80070057), h_result::E_INVALIDARG, csf_); } void test_method_(E_NOTIMPL) { - assert::are_equal(static_cast(0x80004001), h_results::E_NOTIMPL, csf_); + assert::are_equal(static_cast(0x80004001), h_result::E_NOTIMPL, csf_); } void test_method_(E_POINTER) { - assert::are_equal(static_cast(0x80004003), h_results::E_POINTER, csf_); + assert::are_equal(static_cast(0x80004003), h_result::E_POINTER, csf_); } void test_method_(E_UNEXPECTED) { - assert::are_equal(static_cast(0x8000FFFF), h_results::E_UNEXPECTED, csf_); + assert::are_equal(static_cast(0x8000FFFF), h_result::E_UNEXPECTED, csf_); } void test_method_(ERROR_MRM_MAP_NOT_FOUND) { - assert::are_equal(static_cast(0x80073B1F), h_results::ERROR_MRM_MAP_NOT_FOUND, csf_); + assert::are_equal(static_cast(0x80073B1F), h_result::ERROR_MRM_MAP_NOT_FOUND, csf_); } void test_method_(ERROR_TIMEOUT) { - assert::are_equal(static_cast(0x800705B4), h_results::ERROR_TIMEOUT, csf_); + assert::are_equal(static_cast(0x800705B4), h_result::ERROR_TIMEOUT, csf_); } void test_method_(RO_E_CLOSED) { - assert::are_equal(static_cast(0x80000013), h_results::RO_E_CLOSED, csf_); + assert::are_equal(static_cast(0x80000013), h_result::RO_E_CLOSED, csf_); } void test_method_(RPC_E_CHANGED_MODE) { - assert::are_equal(static_cast(0x80010106), h_results::RPC_E_CHANGED_MODE, csf_); + assert::are_equal(static_cast(0x80010106), h_result::RPC_E_CHANGED_MODE, csf_); } void test_method_(TYPE_E_TYPEMISMATCH) { - assert::are_equal(static_cast(0x80028CA0), h_results::TYPE_E_TYPEMISMATCH, csf_); + assert::are_equal(static_cast(0x80028CA0), h_result::TYPE_E_TYPEMISMATCH, csf_); } void test_method_(STG_E_PATHNOTFOUND) { - assert::are_equal(static_cast(0x80030003), h_results::STG_E_PATHNOTFOUND, csf_); + assert::are_equal(static_cast(0x80030003), h_result::STG_E_PATHNOTFOUND, csf_); } void test_method_(CTL_E_PATHNOTFOUND) { - assert::are_equal(static_cast(0x800A004C), h_results::CTL_E_PATHNOTFOUND, csf_); + assert::are_equal(static_cast(0x800A004C), h_result::CTL_E_PATHNOTFOUND, csf_); } void test_method_(CTL_E_FILENOTFOUND) { - assert::are_equal(static_cast(0x800A0035), h_results::CTL_E_FILENOTFOUND, csf_); + assert::are_equal(static_cast(0x800A0035), h_result::CTL_E_FILENOTFOUND, csf_); } void test_method_(FUSION_E_INVALID_NAME) { - assert::are_equal(static_cast(0x80131047), h_results::FUSION_E_INVALID_NAME, csf_); + assert::are_equal(static_cast(0x80131047), h_result::FUSION_E_INVALID_NAME, csf_); } void test_method_(FUSION_E_REF_DEF_MISMATCH) { - assert::are_equal(static_cast(0x80131040), h_results::FUSION_E_REF_DEF_MISMATCH, csf_); + assert::are_equal(static_cast(0x80131040), h_result::FUSION_E_REF_DEF_MISMATCH, csf_); } void test_method_(ERROR_TOO_MANY_OPEN_FILES) { - assert::are_equal(static_cast(0x80070004), h_results::ERROR_TOO_MANY_OPEN_FILES, csf_); + assert::are_equal(static_cast(0x80070004), h_result::ERROR_TOO_MANY_OPEN_FILES, csf_); } void test_method_(ERROR_SHARING_VIOLATION) { - assert::are_equal(static_cast(0x80070020), h_results::ERROR_SHARING_VIOLATION, csf_); + assert::are_equal(static_cast(0x80070020), h_result::ERROR_SHARING_VIOLATION, csf_); } void test_method_(ERROR_LOCK_VIOLATION) { - assert::are_equal(static_cast(0x80070021), h_results::ERROR_LOCK_VIOLATION, csf_); + assert::are_equal(static_cast(0x80070021), h_result::ERROR_LOCK_VIOLATION, csf_); } void test_method_(ERROR_OPEN_FAILED) { - assert::are_equal(static_cast(0x8007006E), h_results::ERROR_OPEN_FAILED, csf_); + assert::are_equal(static_cast(0x8007006E), h_result::ERROR_OPEN_FAILED, csf_); } void test_method_(ERROR_DISK_CORRUPT) { - assert::are_equal(static_cast(0x80070571), h_results::ERROR_DISK_CORRUPT, csf_); + assert::are_equal(static_cast(0x80070571), h_result::ERROR_DISK_CORRUPT, csf_); } void test_method_(ERROR_UNRECOGNIZED_VOLUME) { - assert::are_equal(static_cast(0x800703ED), h_results::ERROR_UNRECOGNIZED_VOLUME, csf_); + assert::are_equal(static_cast(0x800703ED), h_result::ERROR_UNRECOGNIZED_VOLUME, csf_); } void test_method_(ERROR_DLL_INIT_FAILED) { - assert::are_equal(static_cast(0x8007045A), h_results::ERROR_DLL_INIT_FAILED, csf_); + assert::are_equal(static_cast(0x8007045A), h_result::ERROR_DLL_INIT_FAILED, csf_); } void test_method_(MSEE_E_ASSEMBLYLOADINPROGRESS) { - assert::are_equal(static_cast(0x80131016), h_results::MSEE_E_ASSEMBLYLOADINPROGRESS, csf_); + assert::are_equal(static_cast(0x80131016), h_result::MSEE_E_ASSEMBLYLOADINPROGRESS, csf_); } void test_method_(ERROR_FILE_INVALID) { - assert::are_equal(static_cast(0x800703EE), h_results::ERROR_FILE_INVALID, csf_); + assert::are_equal(static_cast(0x800703EE), h_result::ERROR_FILE_INVALID, csf_); } }; }