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

Side by Side Diff: testing/generate_gmock_mutant.py

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 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
« no previous file with comments | « storage/browser/fileapi/sandbox_origin_database.cc ('k') | testing/gmock_mutant.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import string 6 import string
7 import sys 7 import sys
8 8
9 HEADER = """\ 9 HEADER = """\
10 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 10 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // base::MessageLoop* loop = base::MessageLoop::current(); 59 // base::MessageLoop* loop = base::MessageLoop::current();
60 // loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), 60 // loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
61 // 1000 * seconds); 61 // 1000 * seconds);
62 // } 62 // }
63 // }; 63 // };
64 // 64 //
65 // Mock mock; 65 // Mock mock;
66 // // Will invoke mock.HandleFlowers("orchids", n, request) 66 // // Will invoke mock.HandleFlowers("orchids", n, request)
67 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time 67 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time
68 // // arguments - they are not known until the OnRequest mock is invoked. 68 // // arguments - they are not known until the OnRequest mock is invoked.
69 // EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower")) 69 // EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower"))
70 // .Times(1) 70 // .Times(1)
71 // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, 71 // .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers,
72 // string("orchids")))); 72 // string("orchids"))));
73 // 73 //
74 // 74 //
75 // // No pre-bound arguments, two call-time arguments passed 75 // // No pre-bound arguments, two call-time arguments passed
76 // // directly to DoLogMessage 76 // // directly to DoLogMessage
77 // EXPECT_CALL(mock, OnLogMessage(_, _)) 77 // EXPECT_CALL(mock, OnLogMessage(_, _))
78 // .Times(AnyNumber()) 78 // .Times(AnyNumber())
79 // .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); 79 // .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage));
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 print MUTANT 441 print MUTANT
442 for prebound in xrange(0, 6 + 1): 442 for prebound in xrange(0, 6 + 1):
443 for args in xrange(0, 6 + 1): 443 for args in xrange(0, 6 + 1):
444 GenerateCreateFunctor(prebound, args) 444 GenerateCreateFunctor(prebound, args)
445 print FOOTER 445 print FOOTER
446 return 0 446 return 0
447 447
448 448
449 if __name__ == "__main__": 449 if __name__ == "__main__":
450 sys.exit(main()) 450 sys.exit(main())
OLDNEW
« no previous file with comments | « storage/browser/fileapi/sandbox_origin_database.cc ('k') | testing/gmock_mutant.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698