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

Side by Side Diff: base/file_descriptor_shuffle_unittest.cc

Issue 7275004: base: Use TEST() macro in Value unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « base/dir_reader_posix_unittest.cc ('k') | base/values_unittest.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_descriptor_shuffle.h" 5 #include "base/file_descriptor_shuffle.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 using base::InjectiveMultimap;
9 using base::InjectionArc;
10 using base::PerformInjectiveMultimap;
11 using base::InjectionDelegate;
12
13 namespace { 8 namespace {
14 typedef testing::Test FileDescriptorShuffleTest;
15 }
16 9
17 // 'Duplicated' file descriptors start at this number 10 // 'Duplicated' file descriptors start at this number
18 static const int kDuplicateBase = 1000; 11 const int kDuplicateBase = 1000;
12
13 } // namespace
14
15 namespace base {
19 16
20 struct Action { 17 struct Action {
21 enum Type { 18 enum Type {
22 CLOSE, 19 CLOSE,
23 MOVE, 20 MOVE,
24 DUPLICATE, 21 DUPLICATE,
25 }; 22 };
26 23
27 Action(Type in_type, int in_fd1, int in_fd2 = -1) 24 Action(Type in_type, int in_fd1, int in_fd2 = -1)
28 : type(in_type), 25 : type(in_type),
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 EXPECT_TRUE(PerformInjectiveMultimap(map, &failing)); 277 EXPECT_TRUE(PerformInjectiveMultimap(map, &failing));
281 } 278 }
282 279
283 TEST(FileDescriptorShuffleTest, Simple1WithFailure) { 280 TEST(FileDescriptorShuffleTest, Simple1WithFailure) {
284 InjectiveMultimap map; 281 InjectiveMultimap map;
285 FailingDelegate failing; 282 FailingDelegate failing;
286 map.push_back(InjectionArc(0, 1, false)); 283 map.push_back(InjectionArc(0, 1, false));
287 284
288 EXPECT_FALSE(PerformInjectiveMultimap(map, &failing)); 285 EXPECT_FALSE(PerformInjectiveMultimap(map, &failing));
289 } 286 }
287
288 } // namespace base
OLDNEW
« no previous file with comments | « base/dir_reader_posix_unittest.cc ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698