So that the lists in the tests don't have to be in the right order.
}
+bool
+dcp::operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b)
+{
+ if (a.type() != b.type()) {
+ return a.type() < b.type();
+ }
+
+ if (a.code() != b.code()) {
+ return a.code() < b.code();
+ }
+
+ if (a.note() != b.note()) {
+ return a.note().get_value_or("") < b.note().get_value_or("");
+ }
+
+ if (a.file() != b.file()) {
+ return a.file().get_value_or("") < b.file().get_value_or("");
+ }
+
+ return a.line().get_value_or(0) < b.line().get_value_or(0);
+}
+
+
std::ostream&
dcp::operator<< (std::ostream& s, dcp::VerificationNote const& note)
{
std::string note_to_string (dcp::VerificationNote note);
bool operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b);
+bool operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b);
std::ostream& operator<<(std::ostream& s, dcp::VerificationNote const& note);
{
auto notes = dcp::verify ({dir}, &stage, &progress, xsd_test);
BOOST_REQUIRE_EQUAL (notes.size(), test_notes.size());
+ std::sort (notes.begin(), notes.end());
+ std::sort (test_notes.begin(), test_notes.end());
for (auto i = 0U; i < notes.size(); ++i) {
BOOST_REQUIRE_EQUAL (notes[i], test_notes[i]);
}