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

Side by Side Diff: mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc

Issue 644963004: Some more virtual/override updates. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Serialization warnings are only recorded in debug build. 5 // Serialization warnings are only recorded in debug build.
6 #ifndef NDEBUG 6 #ifndef NDEBUG
7 7
8 #include "mojo/public/cpp/bindings/array.h" 8 #include "mojo/public/cpp/bindings/array.h"
9 #include "mojo/public/cpp/bindings/lib/array_internal.h" 9 #include "mojo/public/cpp/bindings/lib/array_internal.h"
10 #include "mojo/public/cpp/bindings/lib/array_serialization.h" 10 #include "mojo/public/cpp/bindings/lib/array_serialization.h"
(...skipping 22 matching lines...) Expand all
33 nested_array[j] = ScopedHandle::From(pipe.handle1.Pass()); 33 nested_array[j] = ScopedHandle::From(pipe.handle1.Pass());
34 } 34 }
35 array[i] = nested_array.Pass(); 35 array[i] = nested_array.Pass();
36 } 36 }
37 37
38 return array.Pass(); 38 return array.Pass();
39 } 39 }
40 40
41 class SerializationWarningTest : public testing::Test { 41 class SerializationWarningTest : public testing::Test {
42 public: 42 public:
43 virtual ~SerializationWarningTest() {} 43 ~SerializationWarningTest() override {}
44 44
45 protected: 45 protected:
46 template <typename T> 46 template <typename T>
47 void TestWarning(StructPtr<T> obj, 47 void TestWarning(StructPtr<T> obj,
48 mojo::internal::ValidationError expected_warning) { 48 mojo::internal::ValidationError expected_warning) {
49 warning_observer_.set_last_warning(mojo::internal::VALIDATION_ERROR_NONE); 49 warning_observer_.set_last_warning(mojo::internal::VALIDATION_ERROR_NONE);
50 50
51 mojo::internal::FixedBuffer buf(GetSerializedSize_(obj)); 51 mojo::internal::FixedBuffer buf(GetSerializedSize_(obj));
52 typename T::Data_* data; 52 typename T::Data_* data;
53 Serialize_(obj.Pass(), &buf, &data); 53 Serialize_(obj.Pass(), &buf, &data);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 ArrayValidateParams<0, false, NoValidateParams>>>( 214 ArrayValidateParams<0, false, NoValidateParams>>>(
215 test_array.Pass(), 215 test_array.Pass(),
216 mojo::internal::VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER); 216 mojo::internal::VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER);
217 } 217 }
218 218
219 } // namespace 219 } // namespace
220 } // namespace test 220 } // namespace test
221 } // namespace mojo 221 } // namespace mojo
222 222
223 #endif 223 #endif
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/sample_service_unittest.cc ('k') | mojo/public/cpp/bindings/tests/struct_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698