CBMC
require_vectors_equal_unordered.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Unit test utilities
4 
5 Author: Diffblue Limited.
6 
7 \*******************************************************************/
8 
9 #ifndef CPROVER_TESTING_UTILS_REQUIRE_VECTORS_EQUAL_UNORDERED_H
10 #define CPROVER_TESTING_UTILS_REQUIRE_VECTORS_EQUAL_UNORDERED_H
11 
13 #include <vector>
14 
19 template <class T>
21  const std::vector<T> &actual,
22  const std::vector<T> &expected)
23 {
24  REQUIRE(actual.size() == expected.size());
25  REQUIRE_THAT(actual, Catch::Matchers::UnorderedEquals(expected));
26 }
27 
28 #endif // CPROVER_TESTING_UTILS_REQUIRE_VECTORS_EQUAL_UNORDERED_H
void require_vectors_equal_unordered(const std::vector< T > &actual, const std::vector< T > &expected)
Checks whether two vectors are equal, ignoring ordering.