|
23 | 23 | #include <stdexcept>
|
24 | 24 | #include <string>
|
25 | 25 | #include <unordered_set>
|
| 26 | +#include <utility> |
26 | 27 | #include <vector>
|
27 | 28 |
|
28 | 29 | namespace testing {
|
@@ -770,7 +771,13 @@ TEST_F(NADeviceTest, QueryOperationData) {
|
770 | 771 | ASSERT_THAT(result, testing::AnyOf(QDMI_SUCCESS,
|
771 | 772 | QDMI_ERROR_NOTSUPPORTED));
|
772 | 773 | if (result == QDMI_SUCCESS) {
|
773 |
| - supportedSites.emplace(sitePair); |
| 774 | + // Ensure the pair is always in the same order when inserted |
| 775 | + // into the set, so that we can compare the sets later. |
| 776 | + if (sitePair.first < sitePair.second) { |
| 777 | + supportedSites.emplace(sitePair); |
| 778 | + } else { |
| 779 | + supportedSites.emplace(sitePair.second, sitePair.first); |
| 780 | + } |
774 | 781 | std::string name(nameSize - 1, '\0');
|
775 | 782 | EXPECT_EQ(MQT_NA_QDMI_device_session_query_operation_property(
|
776 | 783 | session, operation, 0, nullptr, 0, nullptr,
|
@@ -912,7 +919,8 @@ TEST_F(NADeviceTest, QueryOperationData) {
|
912 | 919 | EXPECT_EQ(MQT_NA_QDMI_device_session_query_operation_property(
|
913 | 920 | session, operation, 0, nullptr, 0, nullptr,
|
914 | 921 | QDMI_OPERATION_PROPERTY_SITES, sitesSize,
|
915 |
| - queriedSupportedSitesVec.data(), nullptr), |
| 922 | + static_cast<void*>(queriedSupportedSitesVec.data()), |
| 923 | + nullptr), |
916 | 924 | QDMI_SUCCESS);
|
917 | 925 | const std::unordered_set queriedSupportedSitesSet(
|
918 | 926 | queriedSupportedSitesVec.cbegin(), queriedSupportedSitesVec.cend());
|
|
0 commit comments