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

Side by Side Diff: mojo/edk/system/shared_buffer_dispatcher_unittest.cc

Issue 1755003002: Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
« no previous file with comments | « mojo/edk/system/options_validation.h ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/edk/system/shared_buffer_dispatcher.h" 5 #include "mojo/edk/system/shared_buffer_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 30 matching lines...) Expand all
41 EXPECT_EQ(validated_options.struct_size, revalidated_options.struct_size); 41 EXPECT_EQ(validated_options.struct_size, revalidated_options.struct_size);
42 EXPECT_EQ(validated_options.flags, revalidated_options.flags); 42 EXPECT_EQ(validated_options.flags, revalidated_options.flags);
43 } 43 }
44 44
45 class SharedBufferDispatcherTest : public testing::Test { 45 class SharedBufferDispatcherTest : public testing::Test {
46 public: 46 public:
47 SharedBufferDispatcherTest() {} 47 SharedBufferDispatcherTest() {}
48 ~SharedBufferDispatcherTest() override {} 48 ~SharedBufferDispatcherTest() override {}
49 49
50 private: 50 private:
51 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcherTest); 51 DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcherTest);
52 }; 52 };
53 53
54 // Tests valid inputs to |ValidateCreateOptions()|. 54 // Tests valid inputs to |ValidateCreateOptions()|.
55 TEST_F(SharedBufferDispatcherTest, ValidateCreateOptionsValid) { 55 TEST_F(SharedBufferDispatcherTest, ValidateCreateOptionsValid) {
56 // Default options. 56 // Default options.
57 { 57 {
58 MojoCreateSharedBufferOptions validated_options = {}; 58 MojoCreateSharedBufferOptions validated_options = {};
59 EXPECT_EQ(MOJO_RESULT_OK, SharedBufferDispatcher::ValidateCreateOptions( 59 EXPECT_EQ(MOJO_RESULT_OK, SharedBufferDispatcher::ValidateCreateOptions(
60 nullptr, &validated_options)); 60 nullptr, &validated_options));
61 RevalidateCreateOptions(validated_options); 61 RevalidateCreateOptions(validated_options);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, 297 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
298 dispatcher->MapBuffer(0, 0, MOJO_MAP_BUFFER_FLAG_NONE, &mapping)); 298 dispatcher->MapBuffer(0, 0, MOJO_MAP_BUFFER_FLAG_NONE, &mapping));
299 EXPECT_FALSE(mapping); 299 EXPECT_FALSE(mapping);
300 300
301 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); 301 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close());
302 } 302 }
303 303
304 } // namespace 304 } // namespace
305 } // namespace edk 305 } // namespace edk
306 } // namespace mojo 306 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/options_validation.h ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698