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

Unified Diff: test/cctest/test-heap.cc

Issue 18654006: Make test-heap/TestInternalWeakLists pass with the i18n extension loaded (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index be1098cc4c3877b8c3734a4ba4da99bea9c8509a..2ce341ecd54213f63229cd7e1ee2e3f69510568c 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -1342,17 +1342,22 @@ TEST(TestInternalWeakLists) {
"function f4() { };"
"function f5() { };";
CompileRun(source);
- CHECK_EQ(0, CountOptimizedUserFunctions(ctx[i]));
+ int optimized_user_functions_base = CountOptimizedUserFunctions(ctx[i]);
Michael Starzinger 2013/07/05 12:28:46 Can we move up getting the base number of optimize
CompileRun("f1()");
- CHECK_EQ(opt ? 1 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 1 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
CompileRun("f2()");
- CHECK_EQ(opt ? 2 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 2 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
CompileRun("f3()");
- CHECK_EQ(opt ? 3 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 3 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
CompileRun("f4()");
- CHECK_EQ(opt ? 4 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 4 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
CompileRun("f5()");
- CHECK_EQ(opt ? 5 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 5 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
// Remove function f1, and
CompileRun("f1=null");
@@ -1360,29 +1365,35 @@ TEST(TestInternalWeakLists) {
// Scavenge treats these references as strong.
for (int j = 0; j < 10; j++) {
HEAP->PerformScavenge();
- CHECK_EQ(opt ? 5 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 5 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
}
// Mark compact handles the weak references.
isolate->compilation_cache()->Clear();
heap->CollectAllGarbage(Heap::kNoGCFlags);
- CHECK_EQ(opt ? 4 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 4 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
// Get rid of f3 and f5 in the same way.
CompileRun("f3=null");
for (int j = 0; j < 10; j++) {
HEAP->PerformScavenge();
- CHECK_EQ(opt ? 4 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 4 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
}
HEAP->CollectAllGarbage(Heap::kNoGCFlags);
- CHECK_EQ(opt ? 3 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 3 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
CompileRun("f5=null");
for (int j = 0; j < 10; j++) {
HEAP->PerformScavenge();
- CHECK_EQ(opt ? 3 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 3 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
}
HEAP->CollectAllGarbage(Heap::kNoGCFlags);
- CHECK_EQ(opt ? 2 : 0, CountOptimizedUserFunctions(ctx[i]));
+ CHECK_EQ(opt ? optimized_user_functions_base + 2 : 0,
+ CountOptimizedUserFunctions(ctx[i]));
ctx[i]->Exit();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698