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

Unified Diff: test/cctest/test-api-interceptors.cc

Issue 2654733004: [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Rebasing for relanding Created 3 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
Index: test/cctest/test-api-interceptors.cc
diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc
index 6aebba67bc46a14b154e8d660ef2903f21a90b80..96c2c454a9e23d2bff7966e5bf5762c460f9caa4 100644
--- a/test/cctest/test-api-interceptors.cc
+++ b/test/cctest/test-api-interceptors.cc
@@ -13,6 +13,7 @@
#include "src/compilation-cache.h"
#include "src/execution.h"
#include "src/objects.h"
+#include "src/runtime/runtime.h"
#include "src/unicode-inl.h"
#include "src/utils.h"
@@ -4093,6 +4094,7 @@ THREADED_TEST(NamedPropertyHandlerGetterAttributes) {
THREADED_TEST(Regress256330) {
+ if (!i::FLAG_crankshaft) return;
i::FLAG_allow_natives_syntax = true;
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
@@ -4108,7 +4110,10 @@ THREADED_TEST(Regress256330) {
"f(o); f(o); f(o);"
"%OptimizeFunctionOnNextCall(f);"
"f(o);");
- ExpectBoolean("%GetOptimizationStatus(f) != 2", true);
+ int status = v8_run_int32value(v8_compile("%GetOptimizationStatus(f)"));
+ int mask = static_cast<int>(i::OptimizationStatus::kIsFunction) |
+ static_cast<int>(i::OptimizationStatus::kOptimized);
+ CHECK_EQ(mask, status & mask);
}

Powered by Google App Engine
This is Rietveld 408576698