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

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

Issue 817143002: Contribution of PowerPC port (continuation of 422063005) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port - rebase and address initial set of comments Created 5 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
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | test/mjsunit/big-array-literal.js » ('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 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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 1438
1439 #define INVALID_STRING_TEST(FUN, TYPE) \ 1439 #define INVALID_STRING_TEST(FUN, TYPE) \
1440 TEST(StringOOM##FUN) { \ 1440 TEST(StringOOM##FUN) { \
1441 CcTest::InitializeVM(); \ 1441 CcTest::InitializeVM(); \
1442 LocalContext context; \ 1442 LocalContext context; \
1443 Isolate* isolate = CcTest::i_isolate(); \ 1443 Isolate* isolate = CcTest::i_isolate(); \
1444 STATIC_ASSERT(String::kMaxLength < kMaxInt); \ 1444 STATIC_ASSERT(String::kMaxLength < kMaxInt); \
1445 static const int invalid = String::kMaxLength + 1; \ 1445 static const int invalid = String::kMaxLength + 1; \
1446 HandleScope scope(isolate); \ 1446 HandleScope scope(isolate); \
1447 Vector<TYPE> dummy = Vector<TYPE>::New(invalid); \ 1447 Vector<TYPE> dummy = Vector<TYPE>::New(invalid); \
1448 memset(dummy.start(), 0x0, dummy.length() * sizeof(TYPE)); \
1448 CHECK(isolate->factory()->FUN(Vector<const TYPE>::cast(dummy)).is_null()); \ 1449 CHECK(isolate->factory()->FUN(Vector<const TYPE>::cast(dummy)).is_null()); \
1449 memset(dummy.start(), 0x20, dummy.length() * sizeof(TYPE)); \ 1450 memset(dummy.start(), 0x20, dummy.length() * sizeof(TYPE)); \
1450 CHECK(isolate->has_pending_exception()); \ 1451 CHECK(isolate->has_pending_exception()); \
1451 isolate->clear_pending_exception(); \ 1452 isolate->clear_pending_exception(); \
1452 dummy.Dispose(); \ 1453 dummy.Dispose(); \
1453 } 1454 }
1454 1455
1455 INVALID_STRING_TEST(NewStringFromAscii, char) 1456 INVALID_STRING_TEST(NewStringFromAscii, char)
1456 INVALID_STRING_TEST(NewStringFromUtf8, char) 1457 INVALID_STRING_TEST(NewStringFromUtf8, char)
1457 INVALID_STRING_TEST(NewStringFromOneByte, uint8_t) 1458 INVALID_STRING_TEST(NewStringFromOneByte, uint8_t)
1458 1459
1459 #undef INVALID_STRING_TEST 1460 #undef INVALID_STRING_TEST
OLDNEW
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | test/mjsunit/big-array-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698