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

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

Issue 644963004: Some more virtual/override updates. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 #include "mojo/public/cpp/environment/environment.h" 5 #include "mojo/public/cpp/environment/environment.h"
6 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" 6 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace test { 10 namespace test {
11 11
12 namespace { 12 namespace {
13 13
14 RectPtr CreateRect() { 14 RectPtr CreateRect() {
15 RectPtr r = Rect::New(); 15 RectPtr r = Rect::New();
16 r->x = 1; 16 r->x = 1;
17 r->y = 2; 17 r->y = 2;
18 r->width = 3; 18 r->width = 3;
19 r->height = 4; 19 r->height = 4;
20 return r.Pass(); 20 return r.Pass();
21 } 21 }
22 22
23 class EqualsTest : public testing::Test { 23 class EqualsTest : public testing::Test {
24 public: 24 public:
25 virtual ~EqualsTest() {} 25 ~EqualsTest() override {}
26 26
27 private: 27 private:
28 Environment env_; 28 Environment env_;
29 }; 29 };
30 } 30 }
31 31
32 TEST_F(EqualsTest, Null) { 32 TEST_F(EqualsTest, Null) {
33 RectPtr r1; 33 RectPtr r1;
34 RectPtr r2; 34 RectPtr r2;
35 EXPECT_TRUE(r1.Equals(r2)); 35 EXPECT_TRUE(r1.Equals(r2));
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 m2.at("foo")->rects.resize(1); 111 m2.at("foo")->rects.resize(1);
112 m2.at("foo")->rects[0]->width = 1; 112 m2.at("foo")->rects[0]->width = 1;
113 EXPECT_FALSE(m1.Equals(m2)); 113 EXPECT_FALSE(m1.Equals(m2));
114 114
115 m2 = m1.Clone(); 115 m2 = m1.Clone();
116 EXPECT_TRUE(m1.Equals(m2)); 116 EXPECT_TRUE(m1.Equals(m2));
117 } 117 }
118 118
119 } // test 119 } // test
120 } // mojo 120 } // mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/connector_unittest.cc ('k') | mojo/public/cpp/bindings/tests/handle_passing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698