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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gmock-support.h
diff --git a/testing/gmock-support.h b/testing/gmock-support.h
index ad39e9269bb24404a7a9c52fd39f2479c2567f64..012775b5cbffbf6b33de4fb3bb67c6ae04583ef3 100644
--- a/testing/gmock-support.h
+++ b/testing/gmock-support.h
@@ -5,6 +5,7 @@
#ifndef V8_TESTING_GMOCK_SUPPORT_H_
#define V8_TESTING_GMOCK_SUPPORT_H_
+#include <cmath>
#include <cstring>
#include "testing/gmock/include/gmock/gmock.h"
@@ -96,6 +97,12 @@ inline Matcher<T> CaptureEq(Capture<T>* capture) {
return MakeMatcher(new internal::CaptureEqMatcher<T>(capture));
}
+
+// Creates a polymorphic matcher that matches any floating point NaN value.
+MATCHER(IsNaN, std::string(negation ? "isn't" : "is") + " not a number") {
+ return std::isnan(arg);
+}
+
} // namespace testing
#endif // V8_TESTING_GMOCK_SUPPORT_H_
« 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