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

Side by Side Diff: test/cctest/test-api.cc

Issue 9536005: Rewrite test CHECK to work on all platforms, including MIPS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 12892 matching lines...) Expand 10 before | Expand all | Expand 10 after
12903 12903
12904 // Check other boundary conditions, values and operations. 12904 // Check other boundary conditions, values and operations.
12905 result = CompileRun("for (var i = 0; i < 8; i++) {" 12905 result = CompileRun("for (var i = 0; i < 8; i++) {"
12906 " ext_array[7] = undefined;" 12906 " ext_array[7] = undefined;"
12907 "}" 12907 "}"
12908 "ext_array[7];"); 12908 "ext_array[7];");
12909 CHECK_EQ(0, result->Int32Value()); 12909 CHECK_EQ(0, result->Int32Value());
12910 if (array_type == v8::kExternalDoubleArray || 12910 if (array_type == v8::kExternalDoubleArray ||
12911 array_type == v8::kExternalFloatArray) { 12911 array_type == v8::kExternalFloatArray) {
12912 CHECK_EQ( 12912 CHECK_EQ(
12913 static_cast<int>(0x80000000), 12913 static_cast<int>(i::OS::nan_value()),
12914 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); 12914 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number()));
12915 } else { 12915 } else {
12916 CHECK_EQ(0, static_cast<int>( 12916 CHECK_EQ(0, static_cast<int>(
12917 jsobj->GetElement(7)->ToObjectChecked()->Number())); 12917 jsobj->GetElement(7)->ToObjectChecked()->Number()));
12918 } 12918 }
12919 12919
12920 result = CompileRun("for (var i = 0; i < 8; i++) {" 12920 result = CompileRun("for (var i = 0; i < 8; i++) {"
12921 " ext_array[6] = '2.3';" 12921 " ext_array[6] = '2.3';"
12922 "}" 12922 "}"
12923 "ext_array[6];"); 12923 "ext_array[6];");
(...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
16095 CompileRun("throw 'exception';"); 16095 CompileRun("throw 'exception';");
16096 } 16096 }
16097 16097
16098 16098
16099 TEST(CallCompletedCallbackTwoExceptions) { 16099 TEST(CallCompletedCallbackTwoExceptions) {
16100 v8::HandleScope scope; 16100 v8::HandleScope scope;
16101 LocalContext env; 16101 LocalContext env;
16102 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); 16102 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException);
16103 CompileRun("throw 'first exception';"); 16103 CompileRun("throw 'first exception';");
16104 } 16104 }
OLDNEW
« 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