OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 // Check that we can traverse very deep stacks of ConsStrings using | 28 // Check that we can traverse very deep stacks of ConsStrings using |
29 // StringCharacterStram. Check that Get(int) works on very deep stacks | 29 // StringCharacterStram. Check that Get(int) works on very deep stacks |
30 // of ConsStrings. These operations may not be very fast, but they | 30 // of ConsStrings. These operations may not be very fast, but they |
31 // should be possible without getting errors due to too deep recursion. | 31 // should be possible without getting errors due to too deep recursion. |
32 | 32 |
33 // TODO(jochen): Remove this after the setting is turned on globally. | |
34 #define V8_IMMINENT_DEPRECATION_WARNINGS | |
35 | |
36 #include <stdlib.h> | 33 #include <stdlib.h> |
37 | 34 |
38 #include "src/v8.h" | 35 #include "src/v8.h" |
39 | 36 |
40 #include "src/api.h" | 37 #include "src/api.h" |
41 #include "src/factory.h" | 38 #include "src/factory.h" |
42 #include "src/messages.h" | 39 #include "src/messages.h" |
43 #include "src/objects.h" | 40 #include "src/objects.h" |
44 #include "src/unicode-decoder.h" | 41 #include "src/unicode-decoder.h" |
45 #include "test/cctest/cctest.h" | 42 #include "test/cctest/cctest.h" |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 Handle<String> arg0 = isolate->factory()->NewStringFromAsciiChecked("arg0"); | 1501 Handle<String> arg0 = isolate->factory()->NewStringFromAsciiChecked("arg0"); |
1505 Handle<String> arg1 = isolate->factory()->NewStringFromAsciiChecked("arg1"); | 1502 Handle<String> arg1 = isolate->factory()->NewStringFromAsciiChecked("arg1"); |
1506 Handle<String> arg2 = isolate->factory()->NewStringFromAsciiChecked("arg2"); | 1503 Handle<String> arg2 = isolate->factory()->NewStringFromAsciiChecked("arg2"); |
1507 Handle<String> result = | 1504 Handle<String> result = |
1508 MessageTemplate::FormatMessage(MessageTemplate::kPropertyNotFunction, | 1505 MessageTemplate::FormatMessage(MessageTemplate::kPropertyNotFunction, |
1509 arg0, arg1, arg2).ToHandleChecked(); | 1506 arg0, arg1, arg2).ToHandleChecked(); |
1510 Handle<String> expected = isolate->factory()->NewStringFromAsciiChecked( | 1507 Handle<String> expected = isolate->factory()->NewStringFromAsciiChecked( |
1511 "'arg0' returned for property 'arg1' of object 'arg2' is not a function"); | 1508 "'arg0' returned for property 'arg1' of object 'arg2' is not a function"); |
1512 CHECK(String::Equals(result, expected)); | 1509 CHECK(String::Equals(result, expected)); |
1513 } | 1510 } |
OLD | NEW |