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

Side by Side Diff: testing/gmock/src/gmock-spec-builders.cc

Issue 1151006: Update to current gtest/gmock. (Closed)
Patch Set: rebase Created 10 years, 9 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
OLDNEW
1 // Copyright 2007, Google Inc. 1 // Copyright 2007, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 #if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC 47 #if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
48 #include <unistd.h> // NOLINT 48 #include <unistd.h> // NOLINT
49 #endif 49 #endif
50 50
51 namespace testing { 51 namespace testing {
52 namespace internal { 52 namespace internal {
53 53
54 // Protects the mock object registry (in class Mock), all function 54 // Protects the mock object registry (in class Mock), all function
55 // mockers, and all expectations. 55 // mockers, and all expectations.
56 Mutex g_gmock_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX); 56 GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex);
57 57
58 // Constructs an ExpectationBase object. 58 // Constructs an ExpectationBase object.
59 ExpectationBase::ExpectationBase(const char* a_file, 59 ExpectationBase::ExpectationBase(const char* a_file,
60 int a_line, 60 int a_line,
61 const string& a_source_text) 61 const string& a_source_text)
62 : file_(a_file), 62 : file_(a_file),
63 line_(a_line), 63 line_(a_line),
64 source_text_(a_source_text), 64 source_text_(a_source_text),
65 cardinality_specified_(false), 65 cardinality_specified_(false),
66 cardinality_(Exactly(1)), 66 cardinality_(Exactly(1)),
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // Deletes the implicit sequence if it was created by the constructor 456 // Deletes the implicit sequence if it was created by the constructor
457 // of this object. 457 // of this object.
458 InSequence::~InSequence() { 458 InSequence::~InSequence() {
459 if (sequence_created_) { 459 if (sequence_created_) {
460 delete internal::g_gmock_implicit_sequence.get(); 460 delete internal::g_gmock_implicit_sequence.get();
461 internal::g_gmock_implicit_sequence.set(NULL); 461 internal::g_gmock_implicit_sequence.set(NULL);
462 } 462 }
463 } 463 }
464 464
465 } // namespace testing 465 } // namespace testing
OLDNEW
« no previous file with comments | « testing/gmock/src/gmock-internal-utils.cc ('k') | testing/gmock/test/gmock-generated-matchers_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698