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

Side by Side Diff: tools/gn/unique_vector_unittest.cc

Issue 1549203002: Switch to standard integer types in tools/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « tools/gn/unique_vector.h ('k') | tools/gn/value.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <stddef.h>
6
5 #include <algorithm> 7 #include <algorithm>
6 8
7 #include "base/time/time.h" 9 #include "base/time/time.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 #include "tools/gn/unique_vector.h" 11 #include "tools/gn/unique_vector.h"
10 12
11 TEST(UniqueVector, PushBack) { 13 TEST(UniqueVector, PushBack) {
12 UniqueVector<int> foo; 14 UniqueVector<int> foo;
13 EXPECT_TRUE(foo.push_back(1)); 15 EXPECT_TRUE(foo.push_back(1));
14 EXPECT_FALSE(foo.push_back(1)); 16 EXPECT_FALSE(foo.push_back(1));
(...skipping 19 matching lines...) Expand all
34 std::string a("a"); 36 std::string a("a");
35 EXPECT_TRUE(vect.PushBackViaSwap(&a)); 37 EXPECT_TRUE(vect.PushBackViaSwap(&a));
36 EXPECT_EQ("", a); 38 EXPECT_EQ("", a);
37 39
38 a = "a"; 40 a = "a";
39 EXPECT_FALSE(vect.PushBackViaSwap(&a)); 41 EXPECT_FALSE(vect.PushBackViaSwap(&a));
40 EXPECT_EQ("a", a); 42 EXPECT_EQ("a", a);
41 43
42 EXPECT_EQ(0u, vect.IndexOf("a")); 44 EXPECT_EQ(0u, vect.IndexOf("a"));
43 } 45 }
OLDNEW
« no previous file with comments | « tools/gn/unique_vector.h ('k') | tools/gn/value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698