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

Unified Diff: mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc

Issue 1387993002: mojo::Serialize*_() calls now propogate/return validation errors. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: unscope VALIDATION_ERROR_* enum values. early exit on null-input. additional comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
index b61d3bc57e41482d50bbcbef8eb50b4683d3f132..3d89d565b5ae0d28e832f5cf651edbbebb20d4a0 100644
--- a/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc
@@ -61,7 +61,7 @@ class SerializationWarningTest : public testing::Test {
mojo::internal::FixedBufferForTesting buf(GetSerializedSize_(*obj));
typename T::Data_* data;
- Serialize_(obj.get(), &buf, &data);
+ EXPECT_EQ(expected_warning, Serialize_(obj.get(), &buf, &data));
EXPECT_EQ(expected_warning, warning_observer_.last_warning());
viettrungluu 2015/10/09 01:35:20 I wonder if we should get rid of this whole warnin
vardhan 2015/10/09 22:31:29 I was thinking about that.. It's normally a FATAL
}
@@ -74,7 +74,8 @@ class SerializationWarningTest : public testing::Test {
mojo::internal::FixedBufferForTesting buf(GetSerializedSize_(obj));
typename T::Data_* data;
- SerializeArray_(&obj, &buf, &data, validate_params);
+ EXPECT_EQ(expected_warning,
+ SerializeArray_(&obj, &buf, &data, validate_params));
EXPECT_EQ(expected_warning, warning_observer_.last_warning());
}

Powered by Google App Engine
This is Rietveld 408576698