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

Side by Side Diff: testing/gmock-support.h

Issue 829303002: [turbofan] Generalize constant propagation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix minus zero handling. Created 5 years, 11 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 | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 #ifndef V8_TESTING_GMOCK_SUPPORT_H_ 5 #ifndef V8_TESTING_GMOCK_SUPPORT_H_
6 #define V8_TESTING_GMOCK_SUPPORT_H_ 6 #define V8_TESTING_GMOCK_SUPPORT_H_
7 7
8 #include <cmath>
8 #include <cstring> 9 #include <cstring>
9 10
10 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
11 12
12 namespace testing { 13 namespace testing {
13 14
14 template <typename T> 15 template <typename T>
15 class Capture { 16 class Capture {
16 public: 17 public:
17 Capture() : value_(), has_value_(false) {} 18 Capture() : value_(), has_value_(false) {}
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 90 }
90 91
91 92
92 // CaptureEq(capture) captures the value passed in during matching as long as it 93 // CaptureEq(capture) captures the value passed in during matching as long as it
93 // is unset, and once set, compares the value for equality with the argument. 94 // is unset, and once set, compares the value for equality with the argument.
94 template <typename T> 95 template <typename T>
95 inline Matcher<T> CaptureEq(Capture<T>* capture) { 96 inline Matcher<T> CaptureEq(Capture<T>* capture) {
96 return MakeMatcher(new internal::CaptureEqMatcher<T>(capture)); 97 return MakeMatcher(new internal::CaptureEqMatcher<T>(capture));
97 } 98 }
98 99
100
101 // Creates a polymorphic matcher that matches any floating point NaN value.
102 MATCHER(IsNaN, std::string(negation ? "isn't" : "is") + " not a number") {
103 return std::isnan(arg);
104 }
105
99 } // namespace testing 106 } // namespace testing
100 107
101 #endif // V8_TESTING_GMOCK_SUPPORT_H_ 108 #endif // V8_TESTING_GMOCK_SUPPORT_H_
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698