Skip to content

Commit

Permalink
add h_result unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Sep 30, 2024
1 parent e54fe65 commit 04fe17a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/xtd.core.unit_tests/src/xtd/tests/h_result_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,26 @@ namespace xtd::tests {
assert::are_equal(static_cast<int32>(0x800401F0), h_result::CO_E_NOTINITIALIZED, csf_);
}

void test_method_(DISP_E_PARAMNOTFOUND) {
assert::are_equal(static_cast<int32>(0x80020004), h_result::DISP_E_PARAMNOTFOUND, csf_);
}

void test_method_(DISP_E_TYPEMISMATCH) {
assert::are_equal(static_cast<int32>(0x80020005), h_result::DISP_E_TYPEMISMATCH, csf_);
}

void test_method_(DISP_E_BADVARTYPE) {
assert::are_equal(static_cast<int32>(0x80020008), h_result::DISP_E_BADVARTYPE, csf_);
}

void test_method_(DISP_E_OVERFLOW) {
assert::are_equal(static_cast<int32>(0x8002000A), h_result::DISP_E_OVERFLOW, csf_);
}

void test_method_(DISP_E_DIVBYZERO) {
assert::are_equal(static_cast<int32>(0x80020012), h_result::DISP_E_DIVBYZERO, csf_);
}

void test_method_(E_ABORT) {
assert::are_equal(static_cast<int32>(0x80004004), h_result::E_ABORT, csf_);
}
Expand Down

0 comments on commit 04fe17a

Please sign in to comment.