aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pcm_util.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pcm_util.hxx')
-rw-r--r--test/test_pcm_util.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_pcm_util.hxx b/test/test_pcm_util.hxx
index b378c75a7..216e360ce 100644
--- a/test/test_pcm_util.hxx
+++ b/test/test_pcm_util.hxx
@@ -17,6 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "util/ConstBuffer.hxx"
+
#include <array>
#include <random>
@@ -76,6 +78,14 @@ public:
operator typename std::array<T, N>::const_pointer() const {
return begin();
}
+
+ operator ConstBuffer<T>() const {
+ return { begin(), size() };
+ }
+
+ operator ConstBuffer<void>() const {
+ return { begin(), size() * sizeof(T) };
+ }
};
template<typename T>