| OLD | NEW |
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Points to the implicit sequence introduced by a living InSequence | 133 // Points to the implicit sequence introduced by a living InSequence |
| 134 // object (if any) in the current thread or NULL. | 134 // object (if any) in the current thread or NULL. |
| 135 ThreadLocal<Sequence*> g_gmock_implicit_sequence; | 135 ThreadLocal<Sequence*> g_gmock_implicit_sequence; |
| 136 | 136 |
| 137 // Reports an uninteresting call (whose description is in msg) in the | 137 // Reports an uninteresting call (whose description is in msg) in the |
| 138 // manner specified by 'reaction'. | 138 // manner specified by 'reaction'. |
| 139 void ReportUninterestingCall(CallReaction reaction, const string& msg) { | 139 void ReportUninterestingCall(CallReaction reaction, const string& msg) { |
| 140 switch (reaction) { | 140 switch (reaction) { |
| 141 case ALLOW: | 141 case ALLOW: |
| 142 Log(INFO, msg, 4); | 142 Log(INFO, msg, 3); |
| 143 break; | 143 break; |
| 144 case WARN: | 144 case WARN: |
| 145 Log(WARNING, msg, 4); | 145 Log(WARNING, msg, 3); |
| 146 break; | 146 break; |
| 147 default: // FAIL | 147 default: // FAIL |
| 148 Expect(false, NULL, -1, msg); | 148 Expect(false, NULL, -1, msg); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace internal | 152 } // namespace internal |
| 153 | 153 |
| 154 // Class Mock. | 154 // Class Mock. |
| 155 | 155 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // Deletes the implicit sequence if it was created by the constructor | 444 // Deletes the implicit sequence if it was created by the constructor |
| 445 // of this object. | 445 // of this object. |
| 446 InSequence::~InSequence() { | 446 InSequence::~InSequence() { |
| 447 if (sequence_created_) { | 447 if (sequence_created_) { |
| 448 delete internal::g_gmock_implicit_sequence.get(); | 448 delete internal::g_gmock_implicit_sequence.get(); |
| 449 internal::g_gmock_implicit_sequence.set(NULL); | 449 internal::g_gmock_implicit_sequence.set(NULL); |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // namespace testing | 453 } // namespace testing |
| OLD | NEW |