mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Add stream output to the count test helper for unordered.
[SVN r52397]
This commit is contained in:
@ -6,6 +6,8 @@
|
|||||||
#if !defined(BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD)
|
#if !defined(BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD)
|
||||||
#define BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD
|
#define BOOST_UNORDERED_TEST_HELPERS_COUNT_HEAD
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
namespace test {
|
namespace test {
|
||||||
struct object_count {
|
struct object_count {
|
||||||
int instances;
|
int instances;
|
||||||
@ -36,6 +38,11 @@ namespace test {
|
|||||||
bool operator!=(object_count const& x) const {
|
bool operator!=(object_count const& x) const {
|
||||||
return !(*this == x);
|
return !(*this == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
friend std::ostream& operator<<(std::ostream& out, object_count const& c) {
|
||||||
|
out<<"[instances: "<<c.instances<<", constructions: "<<c.constructions<<"]";
|
||||||
|
return out;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
Reference in New Issue
Block a user