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 19 matching lines...) Expand all Loading... |
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 #include <stdlib.h> | 33 #include <stdlib.h> |
34 | 34 |
35 #include "src/v8.h" | 35 #include "src/v8.h" |
36 | 36 |
37 #include "src/api.h" | 37 #include "src/api.h" |
38 #include "src/factory.h" | 38 #include "src/factory.h" |
39 #include "src/objects.h" | 39 #include "src/objects.h" |
| 40 #include "src/unicode-decoder.h" |
40 #include "test/cctest/cctest.h" | 41 #include "test/cctest/cctest.h" |
41 | 42 |
42 // Adapted from http://en.wikipedia.org/wiki/Multiply-with-carry | 43 // Adapted from http://en.wikipedia.org/wiki/Multiply-with-carry |
43 class MyRandomNumberGenerator { | 44 class MyRandomNumberGenerator { |
44 public: | 45 public: |
45 MyRandomNumberGenerator() { | 46 MyRandomNumberGenerator() { |
46 init(); | 47 init(); |
47 } | 48 } |
48 | 49 |
49 void init(uint32_t seed = 0x5688c73e) { | 50 void init(uint32_t seed = 0x5688c73e) { |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 CHECK(isolate->has_pending_exception()); \ | 1456 CHECK(isolate->has_pending_exception()); \ |
1456 isolate->clear_pending_exception(); \ | 1457 isolate->clear_pending_exception(); \ |
1457 dummy.Dispose(); \ | 1458 dummy.Dispose(); \ |
1458 } | 1459 } |
1459 | 1460 |
1460 INVALID_STRING_TEST(NewStringFromAscii, char) | 1461 INVALID_STRING_TEST(NewStringFromAscii, char) |
1461 INVALID_STRING_TEST(NewStringFromUtf8, char) | 1462 INVALID_STRING_TEST(NewStringFromUtf8, char) |
1462 INVALID_STRING_TEST(NewStringFromOneByte, uint8_t) | 1463 INVALID_STRING_TEST(NewStringFromOneByte, uint8_t) |
1463 | 1464 |
1464 #undef INVALID_STRING_TEST | 1465 #undef INVALID_STRING_TEST |
OLD | NEW |