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

Side by Side Diff: test/cctest/test-js-a64-variables.cc

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-javascript-a64.cc ('k') | test/cctest/test-list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 using ::v8::TryCatch; 62 using ::v8::TryCatch;
63 using ::v8::Undefined; 63 using ::v8::Undefined;
64 using ::v8::V8; 64 using ::v8::V8;
65 using ::v8::Value; 65 using ::v8::Value;
66 66
67 static void ExpectInt32(int32_t expected, Local<Value> result) { 67 static void ExpectInt32(int32_t expected, Local<Value> result) {
68 CHECK(result->IsInt32()); 68 CHECK(result->IsInt32());
69 CHECK_EQ(expected, result->Int32Value()); 69 CHECK_EQ(expected, result->Int32Value());
70 } 70 }
71 71
72
72 // Global variables. 73 // Global variables.
73 TEST(global_variables) { 74 TEST(global_variables) {
74 v8::HandleScope scope; 75 v8::HandleScope scope;
75 LocalContext env; 76 LocalContext env;
76 Local<Value> result = CompileRun( 77 Local<Value> result = CompileRun(
77 "var x = 0;" 78 "var x = 0;"
78 "function f0() { return x; }" 79 "function f0() { return x; }"
79 "f0();"); 80 "f0();");
80 ExpectInt32(0, result); 81 ExpectInt32(0, result);
81 } 82 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 TEST(lookup_slots) { 136 TEST(lookup_slots) {
136 v8::HandleScope scope; 137 v8::HandleScope scope;
137 LocalContext env; 138 LocalContext env;
138 Local<Value> result = CompileRun( 139 Local<Value> result = CompileRun(
139 "function f5(x) {" 140 "function f5(x) {"
140 " with ({}) return x;" 141 " with ({}) return x;"
141 "}" 142 "}"
142 "f5(5);"); 143 "f5(5);");
143 ExpectInt32(5, result); 144 ExpectInt32(5, result);
144 } 145 }
OLDNEW
« no previous file with comments | « test/cctest/test-javascript-a64.cc ('k') | test/cctest/test-list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698