Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: webrtc/base/array_view_unittest.cc

Issue 2293983002: rtc::Buffer: Let SetData and AppendData accept anything with .data() and .size() (Closed)
Patch Set: Use rtc::HasDataAndSize (née rtc::internal::HasDataAndSize) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/array_view_unittest.cc
diff --git a/webrtc/base/array_view_unittest.cc b/webrtc/base/array_view_unittest.cc
index 9d5e1afc60be81ad4017fb6740f2021b232000ce..91facb00436689254889a48bd089604f4beda762 100644
--- a/webrtc/base/array_view_unittest.cc
+++ b/webrtc/base/array_view_unittest.cc
@@ -21,41 +21,6 @@ namespace rtc {
namespace {
-namespace test_has_data_and_size {
-
-template <typename C, typename T>
-using DS = internal::HasDataAndSize<C, T>;
-
-template <typename DR, typename SR>
-struct Test1 {
- DR data();
- SR size();
-};
-static_assert(DS<Test1<int*, int>, int>::value, "");
-static_assert(DS<Test1<int*, int>, const int>::value, "");
-static_assert(DS<Test1<const int*, int>, const int>::value, "");
-static_assert(!DS<Test1<const int*, int>, int>::value, ""); // Wrong const.
-static_assert(!DS<Test1<char*, size_t>, int>::value, ""); // Wrong ptr type.
-
-struct Test2 {
- int* data;
- size_t size;
-};
-static_assert(!DS<Test2, int>::value, ""); // Because they aren't methods.
-
-struct Test3 {
- int* data();
-};
-static_assert(!DS<Test3, int>::value, ""); // Because .size() is missing.
-
-class Test4 {
- int* data();
- size_t size();
-};
-static_assert(!DS<Test4, int>::value, ""); // Because methods are private.
-
-} // namespace test_has_data_and_size
-
template <typename T>
void Call(ArrayView<T>) {}
« no previous file with comments | « webrtc/base/array_view.h ('k') | webrtc/base/base.gyp » ('j') | webrtc/base/type_traits.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698