OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 | 2 |
3 // Check that we can traverse very deep stacks of ConsStrings using | 3 // Check that we can traverse very deep stacks of ConsStrings using |
4 // StringCharacterStram. Check that Get(int) works on very deep stacks | 4 // StringCharacterStram. Check that Get(int) works on very deep stacks |
5 // of ConsStrings. These operations may not be very fast, but they | 5 // of ConsStrings. These operations may not be very fast, but they |
6 // should be possible without getting errors due to too deep recursion. | 6 // should be possible without getting errors due to too deep recursion. |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
| 11 #include "src/ostreams.h" |
11 #include "test/cctest/cctest.h" | 12 #include "test/cctest/cctest.h" |
12 | 13 |
13 using namespace v8::internal; | 14 using namespace v8::internal; |
14 | 15 |
15 | 16 |
16 TEST(Create) { | 17 TEST(Create) { |
17 CcTest::InitializeVM(); | 18 CcTest::InitializeVM(); |
18 Isolate* isolate = CcTest::i_isolate(); | 19 Isolate* isolate = CcTest::i_isolate(); |
19 HandleScope scope(isolate); | 20 HandleScope scope(isolate); |
20 | 21 |
(...skipping 20 matching lines...) Expand all Loading... |
41 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); | 42 CcTest::heap()->CollectAllGarbage(Heap::kNoGCFlags); |
42 | 43 |
43 // All symbols should be distinct. | 44 // All symbols should be distinct. |
44 for (int i = 0; i < kNumSymbols; ++i) { | 45 for (int i = 0; i < kNumSymbols; ++i) { |
45 CHECK(symbols[i]->SameValue(*symbols[i])); | 46 CHECK(symbols[i]->SameValue(*symbols[i])); |
46 for (int j = i + 1; j < kNumSymbols; ++j) { | 47 for (int j = i + 1; j < kNumSymbols; ++j) { |
47 CHECK(!symbols[i]->SameValue(*symbols[j])); | 48 CHECK(!symbols[i]->SameValue(*symbols[j])); |
48 } | 49 } |
49 } | 50 } |
50 } | 51 } |
OLD | NEW |