summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-28 13:36:02 -0700
committerSean V Kelley <seanvk@posteo.de>2016-10-03 11:30:30 -0700
commit0442e739adc068ad86f084fb8582297fccb4117e (patch)
treecde97ff814b7cf26d95353bb3e3ee85b43d2db9e /test
parent8b876d6cd7ae8911bef38de673731556e300999f (diff)
test: move generic toString to i965_streamable.h
The toString template is generic and should be part of the i965_streamable.h header. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'test')
-rw-r--r--test/i965_jpeg_encode_test.cpp10
-rw-r--r--test/i965_streamable.h9
2 files changed, 9 insertions, 10 deletions
diff --git a/test/i965_jpeg_encode_test.cpp b/test/i965_jpeg_encode_test.cpp
index 80ca1fd..a196c20 100644
--- a/test/i965_jpeg_encode_test.cpp
+++ b/test/i965_jpeg_encode_test.cpp
@@ -27,9 +27,7 @@
#include <algorithm>
#include <cstring>
-#include <fstream>
#include <memory>
-#include <sstream>
#include <tuple>
namespace JPEG {
@@ -128,14 +126,6 @@ protected:
virtual void repr(std::ostream& os) const = 0;
};
-template <typename T>
-const std::string toString(const T& t)
-{
- std::ostringstream os;
- os << t;
- return os.str();
-}
-
const TestInput::Shared NV12toI420(const TestInput::SharedConst& nv12)
{
TestInput::Shared i420(
diff --git a/test/i965_streamable.h b/test/i965_streamable.h
index 1c2f217..aab3111 100644
--- a/test/i965_streamable.h
+++ b/test/i965_streamable.h
@@ -28,6 +28,7 @@
#include <array>
#include <iostream>
#include <iomanip>
+#include <sstream>
#include <va/va.h>
namespace std {
@@ -56,6 +57,14 @@ namespace std {
}
}// namespace std
+template <typename T>
+const std::string toString(const T& t)
+{
+ std::ostringstream os;
+ os << t;
+ return os.str();
+}
+
inline std::ostream&
operator<<(std::ostream& os, const VAEncPictureParameterBufferJPEG& b)
{