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

Side by Side Diff: courgette/memory_allocator_unittest.cc

Issue 1543643002: Switch to standard integer types in courgette/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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 | « courgette/memory_allocator.cc ('k') | courgette/memory_monitor.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "courgette/memory_allocator.h" 5 #include "courgette/memory_allocator.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 TEST(MemoryAllocatorTest, NoThrowBuffer) { 14 TEST(MemoryAllocatorTest, NoThrowBuffer) {
13 const size_t size_list[] = {0U, 1U, 2U, 11U, 15U, 16U}; 15 const size_t size_list[] = {0U, 1U, 2U, 11U, 15U, 16U};
14 16
15 // Repeat test for different sizes. 17 // Repeat test for different sizes.
16 for (size_t idx = 0; idx < arraysize(size_list); ++idx) { 18 for (size_t idx = 0; idx < arraysize(size_list); ++idx) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 EXPECT_EQ(buf1[i], buf2[i]); 70 EXPECT_EQ(buf1[i], buf2[i]);
69 for (size_t i = new_size; i < size; ++i) 71 for (size_t i = new_size; i < size; ++i)
70 EXPECT_EQ(kNewValue, buf2[i]); 72 EXPECT_EQ(kNewValue, buf2[i]);
71 73
72 // Test clear(). 74 // Test clear().
73 buf2.clear(); 75 buf2.clear();
74 EXPECT_EQ(0U, buf2.size()); 76 EXPECT_EQ(0U, buf2.size());
75 EXPECT_TRUE(buf2.empty()); 77 EXPECT_TRUE(buf2.empty());
76 } 78 }
77 } 79 }
OLDNEW
« no previous file with comments | « courgette/memory_allocator.cc ('k') | courgette/memory_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698