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

Side by Side Diff: mojo/public/tests/bindings/buffer_unittest.cc

Issue 134823005: Mojo: re-organize public tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bindings/lib/bindings_serialization.h" 5 #include "mojo/public/bindings/lib/bindings_serialization.h"
6 #include "mojo/public/bindings/lib/buffer.h" 6 #include "mojo/public/bindings/lib/buffer.h"
7 #include "mojo/public/tests/simple_bindings_support.h" 7 #include "mojo/public/tests/bindings/simple_bindings_support.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace test { 11 namespace test {
12 12
13 bool IsZero(void* p_buf, size_t size) { 13 bool IsZero(void* p_buf, size_t size) {
14 char* buf = reinterpret_cast<char*>(p_buf); 14 char* buf = reinterpret_cast<char*>(p_buf);
15 for (size_t i = 0; i < size; ++i) { 15 for (size_t i = 0; i < size; ++i) {
16 if (buf[i] != 0) 16 if (buf[i] != 0)
17 return false; 17 return false;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 // Since we called Leak, ptr is still writable after FixedBuffer went out of 105 // Since we called Leak, ptr is still writable after FixedBuffer went out of
106 // scope. 106 // scope.
107 memset(ptr, 1, 8); 107 memset(ptr, 1, 8);
108 free(buf_ptr); 108 free(buf_ptr);
109 } 109 }
110 110
111 } // namespace test 111 } // namespace test
112 } // namespace mojo 112 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/tests/bindings/array_unittest.cc ('k') | mojo/public/tests/bindings/connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698