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

Side by Side Diff: test/cctest/compiler/test-js-constant-cache.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/compiler/typer.h" 9 #include "src/compiler/typer.h"
10 #include "src/types.h" 10 #include "src/types.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 188
189 TEST(NoAliasing) { 189 TEST(NoAliasing) {
190 JSConstantCacheTester T; 190 JSConstantCacheTester T;
191 191
192 Node* nodes[] = {T.UndefinedConstant(), T.TheHoleConstant(), T.TrueConstant(), 192 Node* nodes[] = {T.UndefinedConstant(), T.TheHoleConstant(), T.TrueConstant(),
193 T.FalseConstant(), T.NullConstant(), T.ZeroConstant(), 193 T.FalseConstant(), T.NullConstant(), T.ZeroConstant(),
194 T.OneConstant(), T.NaNConstant(), T.Constant(21), 194 T.OneConstant(), T.NaNConstant(), T.Constant(21),
195 T.Constant(22.2)}; 195 T.Constant(22.2)};
196 196
197 for (size_t i = 0; i < ARRAY_SIZE(nodes); i++) { 197 for (size_t i = 0; i < arraysize(nodes); i++) {
198 for (size_t j = 0; j < ARRAY_SIZE(nodes); j++) { 198 for (size_t j = 0; j < arraysize(nodes); j++) {
199 if (i != j) CHECK_NE(nodes[i], nodes[j]); 199 if (i != j) CHECK_NE(nodes[i], nodes[j]);
200 } 200 }
201 } 201 }
202 } 202 }
203 203
204 204
205 TEST(CanonicalizingNumbers) { 205 TEST(CanonicalizingNumbers) {
206 JSConstantCacheTester T; 206 JSConstantCacheTester T;
207 207
208 FOR_FLOAT64_INPUTS(i) { 208 FOR_FLOAT64_INPUTS(i) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 CHECK(T.upper(T.NullConstant())->Is(Type::Null())); 275 CHECK(T.upper(T.NullConstant())->Is(Type::Null()));
276 CHECK(T.upper(T.ZeroConstant())->Is(Type::Number())); 276 CHECK(T.upper(T.ZeroConstant())->Is(Type::Number()));
277 CHECK(T.upper(T.OneConstant())->Is(Type::Number())); 277 CHECK(T.upper(T.OneConstant())->Is(Type::Number()));
278 CHECK(T.upper(T.NaNConstant())->Is(Type::NaN())); 278 CHECK(T.upper(T.NaNConstant())->Is(Type::NaN()));
279 } 279 }
280 280
281 281
282 TEST(ExternalReferences) { 282 TEST(ExternalReferences) {
283 // TODO(titzer): test canonicalization of external references. 283 // TODO(titzer): test canonicalization of external references.
284 } 284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698