mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Updated with coderabbit suggestions
This commit is contained in:
parent
398ef49124
commit
6d8bba986c
@ -350,7 +350,7 @@ namespace
|
||||
|
||||
CHECK(isEqual);
|
||||
|
||||
CHECK_TRUE(std::is_sorted(otherData.begin(), otherData.end(), data.value_comp()));
|
||||
CHECK_TRUE(std::is_sorted(otherData.begin(), otherData.end(), otherData.value_comp()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1705,13 +1705,8 @@ namespace
|
||||
const std::vector<element> actual(data.begin(), data.end());
|
||||
|
||||
CHECK_TRUE(std::is_sorted(data.begin(), data.end(), data.value_comp()));
|
||||
|
||||
auto compare = [](const etl::map<int, int, 8>::value_type& lhs, const etl::map<int, int, 8>::value_type& rhs)
|
||||
{
|
||||
return (lhs.first == rhs.first) && (lhs.second == rhs.second);
|
||||
};
|
||||
|
||||
CHECK_TRUE((std::equal(data.begin(), data.end(), expected.begin(), compare)));
|
||||
CHECK_EQUAL(expected.size(), actual.size());
|
||||
CHECK_TRUE(actual == expected);
|
||||
|
||||
} while (std::next_permutation(permutation.begin(), permutation.end()));
|
||||
}
|
||||
|
||||
@ -1742,13 +1742,8 @@ namespace
|
||||
const std::vector<element> actual(data.begin(), data.end());
|
||||
|
||||
CHECK_TRUE(std::is_sorted(data.begin(), data.end(), data.value_comp()));
|
||||
|
||||
auto compare = [](const etl::multimap<int, int, 8>::value_type& lhs, const etl::multimap<int, int, 8>::value_type& rhs)
|
||||
{
|
||||
return (lhs.first == rhs.first) && (lhs.second == rhs.second);
|
||||
};
|
||||
|
||||
CHECK_TRUE((std::equal(data.begin(), data.end(), expected.begin(), compare)));
|
||||
CHECK_EQUAL(expected.size(), actual.size());
|
||||
CHECK_TRUE(actual == expected);
|
||||
|
||||
} while (std::next_permutation(permutation.begin(), permutation.end()));
|
||||
}
|
||||
|
||||
@ -1665,6 +1665,7 @@ namespace
|
||||
data.erase(it);
|
||||
|
||||
CHECK_TRUE(std::is_sorted(data.begin(), data.end(), data.key_comp()));
|
||||
CHECK_EQUAL(expected.size(), data.size());
|
||||
CHECK_TRUE((std::equal(data.begin(), data.end(), expected.begin())));
|
||||
|
||||
} while (std::next_permutation(permutation.begin(), permutation.end()));
|
||||
|
||||
@ -1502,6 +1502,7 @@ namespace
|
||||
data.erase(it);
|
||||
|
||||
CHECK_TRUE(std::is_sorted(data.begin(), data.end(), data.key_comp()));
|
||||
CHECK_EQUAL(expected.size(), data.size());
|
||||
CHECK_TRUE((std::equal(data.begin(), data.end(), expected.begin())));
|
||||
|
||||
} while (std::next_permutation(permutation.begin(), permutation.end()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user