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

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

Issue 405653003: mojo: Make InterfacePtr<> testable in if() statements without .get(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to is_bound() Created 6 years, 5 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/interface_ptr_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index 8f1de632dee82a32874a97f8733485fbb9dbc1e3..533d990ee9afe7401376169940a0d141b2652cb0 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -252,19 +252,19 @@ TEST_F(InterfacePtrTest, Movable) {
math::CalculatorPtr b;
BindToProxy(new MathCalculatorImpl(), &b);
- EXPECT_TRUE(!a.get());
- EXPECT_FALSE(!b.get());
+ EXPECT_TRUE(!a);
+ EXPECT_FALSE(!b);
a = b.Pass();
- EXPECT_FALSE(!a.get());
- EXPECT_TRUE(!b.get());
+ EXPECT_FALSE(!a);
+ EXPECT_TRUE(!b);
}
TEST_F(InterfacePtrTest, Resettable) {
math::CalculatorPtr a;
- EXPECT_TRUE(!a.get());
+ EXPECT_TRUE(!a);
MessagePipe pipe;
@@ -273,11 +273,11 @@ TEST_F(InterfacePtrTest, Resettable) {
a = MakeProxy<math::Calculator>(pipe.handle0.Pass());
- EXPECT_FALSE(!a.get());
+ EXPECT_FALSE(!a);
a.reset();
- EXPECT_TRUE(!a.get());
+ EXPECT_TRUE(!a);
EXPECT_FALSE(a.internal_state()->router_for_testing());
// Test that handle was closed.
« no previous file with comments | « mojo/public/cpp/bindings/tests/handle_passing_unittest.cc ('k') | mojo/services/gles2/command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698