Compare left and right without epsilon and returns true if they are equal.
| 1016 | for (const auto& vector : results) { |
| 1017 | totalCount += vector->size(); |
| 1018 | } |
| 1019 | EXPECT_EQ(0, totalCount) << "Expected empty result but received " |
| 1020 | << totalCount << " rows"; |
| 1021 | } |
| 1022 | |
| 1023 | // Compare left and right without epsilon and returns true if they are equal. |
| 1024 | static bool compareMaterializedRows( |
| 1025 | const MaterializedRowMultiset& left, |
| 1026 | const MaterializedRowMultiset& right) { |
| 1027 | if (left.size() != right.size()) { |
| 1028 | return false; |
| 1029 | } |
| 1030 | |
| 1031 | for (auto& it : left) { |
| 1032 | if (right.count(it) != left.count(it)) { |
| 1033 | return false; |
| 1034 | } |
| 1035 | } |
| 1036 | |
| 1037 | // In case left has duplicate values and there are values in right but not in |
| 1038 | // left, check the other way around. E.g., left = {1, 1, 2}, right = {1, 2, |
| 1039 | // 3}. |
| 1040 | for (auto& it : right) { |
| 1041 | if (left.count(it) != right.count(it)) { |
| 1042 | return false; |
| 1043 | } |
| 1044 | } |
no test coverage detected