blob: 88e40088823198f75537fab2a1dcf000fee9c647 [file] [log] [blame]
shiqiane35fdd92008-12-10 05:08:54 +00001// Copyright 2007, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: wan@google.com (Zhanyong Wan)
31
32// Google Mock - a framework for writing C++ mock classes.
33//
zhanyong.wan4a5330d2009-02-19 00:36:44 +000034// This file implements Matcher<const string&>, Matcher<string>, and
35// utilities for defining matchers.
shiqiane35fdd92008-12-10 05:08:54 +000036
zhanyong.wan53e08c42010-09-14 05:38:21 +000037#include "gmock/gmock-matchers.h"
38#include "gmock/gmock-generated-matchers.h"
zhanyong.wan4a5330d2009-02-19 00:36:44 +000039
40#include <string.h>
Gennadiy Civil2bd17502018-02-27 13:51:09 -050041#include <iostream>
zhanyong.wan4a5330d2009-02-19 00:36:44 +000042#include <sstream>
43#include <string>
shiqiane35fdd92008-12-10 05:08:54 +000044
45namespace testing {
46
47// Constructs a matcher that matches a const string& whose value is
48// equal to s.
49Matcher<const internal::string&>::Matcher(const internal::string& s) {
50 *this = Eq(s);
51}
52
53// Constructs a matcher that matches a const string& whose value is
54// equal to s.
55Matcher<const internal::string&>::Matcher(const char* s) {
56 *this = Eq(internal::string(s));
57}
58
59// Constructs a matcher that matches a string whose value is equal to s.
60Matcher<internal::string>::Matcher(const internal::string& s) { *this = Eq(s); }
61
62// Constructs a matcher that matches a string whose value is equal to s.
63Matcher<internal::string>::Matcher(const char* s) {
64 *this = Eq(internal::string(s));
65}
66
zhanyong.wan1f122a02013-03-25 16:27:03 +000067#if GTEST_HAS_STRING_PIECE_
68// Constructs a matcher that matches a const StringPiece& whose value is
69// equal to s.
70Matcher<const StringPiece&>::Matcher(const internal::string& s) {
71 *this = Eq(s);
72}
73
74// Constructs a matcher that matches a const StringPiece& whose value is
75// equal to s.
76Matcher<const StringPiece&>::Matcher(const char* s) {
77 *this = Eq(internal::string(s));
78}
79
80// Constructs a matcher that matches a const StringPiece& whose value is
81// equal to s.
82Matcher<const StringPiece&>::Matcher(StringPiece s) {
83 *this = Eq(s.ToString());
84}
85
86// Constructs a matcher that matches a StringPiece whose value is equal to s.
87Matcher<StringPiece>::Matcher(const internal::string& s) {
88 *this = Eq(s);
89}
90
91// Constructs a matcher that matches a StringPiece whose value is equal to s.
92Matcher<StringPiece>::Matcher(const char* s) {
93 *this = Eq(internal::string(s));
94}
95
96// Constructs a matcher that matches a StringPiece whose value is equal to s.
97Matcher<StringPiece>::Matcher(StringPiece s) {
98 *this = Eq(s.ToString());
99}
100#endif // GTEST_HAS_STRING_PIECE_
101
zhanyong.wan4a5330d2009-02-19 00:36:44 +0000102namespace internal {
103
zhanyong.wanb4140802010-06-08 22:53:57 +0000104// Returns the description for a matcher defined using the MATCHER*()
105// macro where the user-supplied description string is "", if
106// 'negation' is false; otherwise returns the description of the
107// negation of the matcher. 'param_values' contains a list of strings
108// that are the print-out of the matcher's parameters.
vladlosev587c1b32011-05-20 00:42:22 +0000109GTEST_API_ string FormatMatcherDescription(bool negation,
110 const char* matcher_name,
111 const Strings& param_values) {
zhanyong.wanb4140802010-06-08 22:53:57 +0000112 string result = ConvertIdentifierNameToWords(matcher_name);
113 if (param_values.size() >= 1)
114 result += " " + JoinAsTuple(param_values);
115 return negation ? "not (" + result + ")" : result;
zhanyong.wan4a5330d2009-02-19 00:36:44 +0000116}
117
zhanyong.wanfb25d532013-07-28 08:24:00 +0000118// FindMaxBipartiteMatching and its helper class.
119//
120// Uses the well-known Ford-Fulkerson max flow method to find a maximum
121// bipartite matching. Flow is considered to be from left to right.
122// There is an implicit source node that is connected to all of the left
123// nodes, and an implicit sink node that is connected to all of the
124// right nodes. All edges have unit capacity.
125//
126// Neither the flow graph nor the residual flow graph are represented
127// explicitly. Instead, they are implied by the information in 'graph' and
128// a vector<int> called 'left_' whose elements are initialized to the
129// value kUnused. This represents the initial state of the algorithm,
130// where the flow graph is empty, and the residual flow graph has the
131// following edges:
132// - An edge from source to each left_ node
133// - An edge from each right_ node to sink
134// - An edge from each left_ node to each right_ node, if the
135// corresponding edge exists in 'graph'.
136//
137// When the TryAugment() method adds a flow, it sets left_[l] = r for some
138// nodes l and r. This induces the following changes:
139// - The edges (source, l), (l, r), and (r, sink) are added to the
140// flow graph.
141// - The same three edges are removed from the residual flow graph.
142// - The reverse edges (l, source), (r, l), and (sink, r) are added
143// to the residual flow graph, which is a directional graph
144// representing unused flow capacity.
145//
146// When the method augments a flow (moving left_[l] from some r1 to some
147// other r2), this can be thought of as "undoing" the above steps with
148// respect to r1 and "redoing" them with respect to r2.
149//
150// It bears repeating that the flow graph and residual flow graph are
151// never represented explicitly, but can be derived by looking at the
152// information in 'graph' and in left_.
153//
154// As an optimization, there is a second vector<int> called right_ which
155// does not provide any new information. Instead, it enables more
156// efficient queries about edges entering or leaving the right-side nodes
157// of the flow or residual flow graphs. The following invariants are
158// maintained:
159//
160// left[l] == kUnused or right[left[l]] == l
161// right[r] == kUnused or left[right[r]] == r
162//
163// . [ source ] .
164// . ||| .
165// . ||| .
166// . ||\--> left[0]=1 ---\ right[0]=-1 ----\ .
167// . || | | .
168// . |\---> left[1]=-1 \--> right[1]=0 ---\| .
169// . | || .
170// . \----> left[2]=2 ------> right[2]=2 --\|| .
171// . ||| .
172// . elements matchers vvv .
173// . [ sink ] .
174//
175// See Also:
kosak15d61e42014-03-24 22:08:24 +0000176// [1] Cormen, et al (2001). "Section 26.2: The Ford-Fulkerson method".
177// "Introduction to Algorithms (Second ed.)", pp. 651-664.
178// [2] "Ford-Fulkerson algorithm", Wikipedia,
zhanyong.wanfb25d532013-07-28 08:24:00 +0000179// 'http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm'
180class MaxBipartiteMatchState {
181 public:
182 explicit MaxBipartiteMatchState(const MatchMatrix& graph)
183 : graph_(&graph),
184 left_(graph_->LhsSize(), kUnused),
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500185 right_(graph_->RhsSize(), kUnused) {}
zhanyong.wanfb25d532013-07-28 08:24:00 +0000186
187 // Returns the edges of a maximal match, each in the form {left, right}.
188 ElementMatcherPairs Compute() {
189 // 'seen' is used for path finding { 0: unseen, 1: seen }.
190 ::std::vector<char> seen;
191 // Searches the residual flow graph for a path from each left node to
192 // the sink in the residual flow graph, and if one is found, add flow
193 // to the graph. It's okay to search through the left nodes once. The
194 // edge from the implicit source node to each previously-visited left
195 // node will have flow if that left node has any path to the sink
196 // whatsoever. Subsequent augmentations can only add flow to the
197 // network, and cannot take away that previous flow unit from the source.
198 // Since the source-to-left edge can only carry one flow unit (or,
199 // each element can be matched to only one matcher), there is no need
200 // to visit the left nodes more than once looking for augmented paths.
201 // The flow is known to be possible or impossible by looking at the
202 // node once.
203 for (size_t ilhs = 0; ilhs < graph_->LhsSize(); ++ilhs) {
204 // Reset the path-marking vector and try to find a path from
205 // source to sink starting at the left_[ilhs] node.
206 GTEST_CHECK_(left_[ilhs] == kUnused)
207 << "ilhs: " << ilhs << ", left_[ilhs]: " << left_[ilhs];
208 // 'seen' initialized to 'graph_->RhsSize()' copies of 0.
209 seen.assign(graph_->RhsSize(), 0);
210 TryAugment(ilhs, &seen);
211 }
212 ElementMatcherPairs result;
213 for (size_t ilhs = 0; ilhs < left_.size(); ++ilhs) {
214 size_t irhs = left_[ilhs];
215 if (irhs == kUnused) continue;
216 result.push_back(ElementMatcherPair(ilhs, irhs));
217 }
218 return result;
219 }
220
221 private:
222 static const size_t kUnused = static_cast<size_t>(-1);
223
224 // Perform a depth-first search from left node ilhs to the sink. If a
225 // path is found, flow is added to the network by linking the left and
226 // right vector elements corresponding each segment of the path.
227 // Returns true if a path to sink was found, which means that a unit of
228 // flow was added to the network. The 'seen' vector elements correspond
229 // to right nodes and are marked to eliminate cycles from the search.
230 //
231 // Left nodes will only be explored at most once because they
232 // are accessible from at most one right node in the residual flow
233 // graph.
234 //
235 // Note that left_[ilhs] is the only element of left_ that TryAugment will
236 // potentially transition from kUnused to another value. Any other
237 // left_ element holding kUnused before TryAugment will be holding it
238 // when TryAugment returns.
239 //
240 bool TryAugment(size_t ilhs, ::std::vector<char>* seen) {
241 for (size_t irhs = 0; irhs < graph_->RhsSize(); ++irhs) {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500242 if ((*seen)[irhs]) continue;
243 if (!graph_->HasEdge(ilhs, irhs)) continue;
zhanyong.wanfb25d532013-07-28 08:24:00 +0000244 // There's an available edge from ilhs to irhs.
245 (*seen)[irhs] = 1;
246 // Next a search is performed to determine whether
247 // this edge is a dead end or leads to the sink.
248 //
249 // right_[irhs] == kUnused means that there is residual flow from
250 // right node irhs to the sink, so we can use that to finish this
251 // flow path and return success.
252 //
253 // Otherwise there is residual flow to some ilhs. We push flow
254 // along that path and call ourselves recursively to see if this
255 // ultimately leads to sink.
256 if (right_[irhs] == kUnused || TryAugment(right_[irhs], seen)) {
257 // Add flow from left_[ilhs] to right_[irhs].
258 left_[ilhs] = irhs;
259 right_[irhs] = ilhs;
260 return true;
261 }
262 }
263 return false;
264 }
265
266 const MatchMatrix* graph_; // not owned
267 // Each element of the left_ vector represents a left hand side node
268 // (i.e. an element) and each element of right_ is a right hand side
269 // node (i.e. a matcher). The values in the left_ vector indicate
Li Peng266a1852016-04-27 16:41:27 +0800270 // outflow from that node to a node on the right_ side. The values
zhanyong.wanfb25d532013-07-28 08:24:00 +0000271 // in the right_ indicate inflow, and specify which left_ node is
272 // feeding that right_ node, if any. For example, left_[3] == 1 means
273 // there's a flow from element #3 to matcher #1. Such a flow would also
274 // be redundantly represented in the right_ vector as right_[1] == 3.
275 // Elements of left_ and right_ are either kUnused or mutually
276 // referent. Mutually referent means that left_[right_[i]] = i and
277 // right_[left_[i]] = i.
278 ::std::vector<size_t> left_;
279 ::std::vector<size_t> right_;
280
281 GTEST_DISALLOW_ASSIGN_(MaxBipartiteMatchState);
282};
283
284const size_t MaxBipartiteMatchState::kUnused;
285
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500286GTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching(const MatchMatrix& g) {
zhanyong.wanfb25d532013-07-28 08:24:00 +0000287 return MaxBipartiteMatchState(g).Compute();
288}
289
290static void LogElementMatcherPairVec(const ElementMatcherPairs& pairs,
291 ::std::ostream* stream) {
292 typedef ElementMatcherPairs::const_iterator Iter;
293 ::std::ostream& os = *stream;
294 os << "{";
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500295 const char* sep = "";
zhanyong.wanfb25d532013-07-28 08:24:00 +0000296 for (Iter it = pairs.begin(); it != pairs.end(); ++it) {
297 os << sep << "\n ("
298 << "element #" << it->first << ", "
299 << "matcher #" << it->second << ")";
300 sep = ",";
301 }
302 os << "\n}";
303}
304
zhanyong.wanfb25d532013-07-28 08:24:00 +0000305bool MatchMatrix::NextGraph() {
306 for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) {
307 for (size_t irhs = 0; irhs < RhsSize(); ++irhs) {
308 char& b = matched_[SpaceIndex(ilhs, irhs)];
309 if (!b) {
310 b = 1;
311 return true;
312 }
313 b = 0;
314 }
315 }
316 return false;
317}
318
319void MatchMatrix::Randomize() {
320 for (size_t ilhs = 0; ilhs < LhsSize(); ++ilhs) {
321 for (size_t irhs = 0; irhs < RhsSize(); ++irhs) {
322 char& b = matched_[SpaceIndex(ilhs, irhs)];
323 b = static_cast<char>(rand() & 1); // NOLINT
324 }
325 }
326}
327
Nico Weber09fd5b32017-05-15 17:07:03 -0400328std::string MatchMatrix::DebugString() const {
zhanyong.wanfb25d532013-07-28 08:24:00 +0000329 ::std::stringstream ss;
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500330 const char* sep = "";
zhanyong.wanfb25d532013-07-28 08:24:00 +0000331 for (size_t i = 0; i < LhsSize(); ++i) {
332 ss << sep;
333 for (size_t j = 0; j < RhsSize(); ++j) {
334 ss << HasEdge(i, j);
335 }
336 sep = ";";
337 }
338 return ss.str();
339}
340
341void UnorderedElementsAreMatcherImplBase::DescribeToImpl(
342 ::std::ostream* os) const {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500343 switch (match_flags()) {
344 case UnorderedMatcherRequire::ExactMatch:
345 if (matcher_describers_.empty()) {
346 *os << "is empty";
347 return;
348 }
349 if (matcher_describers_.size() == 1) {
350 *os << "has " << Elements(1) << " and that element ";
351 matcher_describers_[0]->DescribeTo(os);
352 return;
353 }
354 *os << "has " << Elements(matcher_describers_.size())
355 << " and there exists some permutation of elements such that:\n";
356 break;
357 case UnorderedMatcherRequire::Superset:
358 *os << "a surjection from elements to requirements exists such that:\n";
359 break;
360 case UnorderedMatcherRequire::Subset:
361 *os << "an injection from elements to requirements exists such that:\n";
362 break;
zhanyong.wanfb25d532013-07-28 08:24:00 +0000363 }
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500364
zhanyong.wanfb25d532013-07-28 08:24:00 +0000365 const char* sep = "";
366 for (size_t i = 0; i != matcher_describers_.size(); ++i) {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500367 *os << sep;
368 if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
369 *os << " - element #" << i << " ";
370 } else {
371 *os << " - an element ";
372 }
zhanyong.wanfb25d532013-07-28 08:24:00 +0000373 matcher_describers_[i]->DescribeTo(os);
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500374 if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
375 sep = ", and\n";
376 } else {
377 sep = "\n";
378 }
zhanyong.wanfb25d532013-07-28 08:24:00 +0000379 }
380}
381
382void UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(
383 ::std::ostream* os) const {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500384 switch (match_flags()) {
385 case UnorderedMatcherRequire::ExactMatch:
386 if (matcher_describers_.empty()) {
387 *os << "isn't empty";
388 return;
389 }
390 if (matcher_describers_.size() == 1) {
391 *os << "doesn't have " << Elements(1) << ", or has " << Elements(1)
392 << " that ";
393 matcher_describers_[0]->DescribeNegationTo(os);
394 return;
395 }
396 *os << "doesn't have " << Elements(matcher_describers_.size())
397 << ", or there exists no permutation of elements such that:\n";
398 break;
399 case UnorderedMatcherRequire::Superset:
400 *os << "no surjection from elements to requirements exists such that:\n";
401 break;
402 case UnorderedMatcherRequire::Subset:
403 *os << "no injection from elements to requirements exists such that:\n";
404 break;
zhanyong.wanfb25d532013-07-28 08:24:00 +0000405 }
zhanyong.wanfb25d532013-07-28 08:24:00 +0000406 const char* sep = "";
407 for (size_t i = 0; i != matcher_describers_.size(); ++i) {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500408 *os << sep;
409 if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
410 *os << " - element #" << i << " ";
411 } else {
412 *os << " - an element ";
413 }
zhanyong.wanfb25d532013-07-28 08:24:00 +0000414 matcher_describers_[i]->DescribeTo(os);
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500415 if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
416 sep = ", and\n";
417 } else {
418 sep = "\n";
419 }
zhanyong.wanfb25d532013-07-28 08:24:00 +0000420 }
421}
422
423// Checks that all matchers match at least one element, and that all
424// elements match at least one matcher. This enables faster matching
425// and better error reporting.
426// Returns false, writing an explanation to 'listener', if and only
427// if the success criteria are not met.
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500428bool UnorderedElementsAreMatcherImplBase::VerifyMatchMatrix(
429 const ::std::vector<std::string>& element_printouts,
430 const MatchMatrix& matrix, MatchResultListener* listener) const {
zhanyong.wanfb25d532013-07-28 08:24:00 +0000431 bool result = true;
432 ::std::vector<char> element_matched(matrix.LhsSize(), 0);
433 ::std::vector<char> matcher_matched(matrix.RhsSize(), 0);
434
435 for (size_t ilhs = 0; ilhs < matrix.LhsSize(); ilhs++) {
436 for (size_t irhs = 0; irhs < matrix.RhsSize(); irhs++) {
437 char matched = matrix.HasEdge(ilhs, irhs);
438 element_matched[ilhs] |= matched;
439 matcher_matched[irhs] |= matched;
440 }
441 }
442
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500443 if (match_flags() & UnorderedMatcherRequire::Superset) {
zhanyong.wanfb25d532013-07-28 08:24:00 +0000444 const char* sep =
445 "where the following matchers don't match any elements:\n";
446 for (size_t mi = 0; mi < matcher_matched.size(); ++mi) {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500447 if (matcher_matched[mi]) continue;
zhanyong.wanfb25d532013-07-28 08:24:00 +0000448 result = false;
449 if (listener->IsInterested()) {
450 *listener << sep << "matcher #" << mi << ": ";
451 matcher_describers_[mi]->DescribeTo(listener->stream());
452 sep = ",\n";
453 }
454 }
455 }
456
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500457 if (match_flags() & UnorderedMatcherRequire::Subset) {
zhanyong.wanfb25d532013-07-28 08:24:00 +0000458 const char* sep =
459 "where the following elements don't match any matchers:\n";
460 const char* outer_sep = "";
461 if (!result) {
462 outer_sep = "\nand ";
463 }
464 for (size_t ei = 0; ei < element_matched.size(); ++ei) {
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500465 if (element_matched[ei]) continue;
zhanyong.wanfb25d532013-07-28 08:24:00 +0000466 result = false;
467 if (listener->IsInterested()) {
468 *listener << outer_sep << sep << "element #" << ei << ": "
469 << element_printouts[ei];
470 sep = ",\n";
471 outer_sep = "";
472 }
473 }
474 }
475 return result;
476}
477
Gennadiy Civil2bd17502018-02-27 13:51:09 -0500478bool UnorderedElementsAreMatcherImplBase::FindPairing(
479 const MatchMatrix& matrix, MatchResultListener* listener) const {
480 ElementMatcherPairs matches = FindMaxBipartiteMatching(matrix);
481
482 size_t max_flow = matches.size();
483 if ((match_flags() & UnorderedMatcherRequire::Superset) &&
484 max_flow < matrix.RhsSize()) {
485 if (listener->IsInterested()) {
486 *listener << "where no permutation of the elements can satisfy all "
487 "matchers, and the closest match is "
488 << max_flow << " of " << matrix.RhsSize()
489 << " matchers with the pairings:\n";
490 LogElementMatcherPairVec(matches, listener->stream());
491 }
492 return false;
493 }
494 if ((match_flags() & UnorderedMatcherRequire::Subset) &&
495 max_flow < matrix.LhsSize()) {
496 if (listener->IsInterested()) {
497 *listener
498 << "where not all elements can be matched, and the closest match is "
499 << max_flow << " of " << matrix.RhsSize()
500 << " matchers with the pairings:\n";
501 LogElementMatcherPairVec(matches, listener->stream());
502 }
503 return false;
504 }
505
506 if (matches.size() > 1) {
507 if (listener->IsInterested()) {
508 const char* sep = "where:\n";
509 for (size_t mi = 0; mi < matches.size(); ++mi) {
510 *listener << sep << " - element #" << matches[mi].first
511 << " is matched by matcher #" << matches[mi].second;
512 sep = ",\n";
513 }
514 }
515 }
516 return true;
517}
518
zhanyong.wan4a5330d2009-02-19 00:36:44 +0000519} // namespace internal
shiqiane35fdd92008-12-10 05:08:54 +0000520} // namespace testing