| Index: runtime/vm/object_test.cc
|
| ===================================================================
|
| --- runtime/vm/object_test.cc (revision 39113)
|
| +++ runtime/vm/object_test.cc (working copy)
|
| @@ -401,7 +401,7 @@
|
| }
|
|
|
|
|
| -TEST_CASE(StringEncodeURI) {
|
| +TEST_CASE(StringEncodeIRI) {
|
| const char* kInput =
|
| "file:///usr/local/johnmccutchan/workspace/dart-repo/dart/test.dart";
|
| const char* kOutput =
|
| @@ -409,12 +409,12 @@
|
| "dart-repo%2Fdart%2Ftest.dart";
|
| const String& input = String::Handle(String::New(kInput));
|
| const String& output = String::Handle(String::New(kOutput));
|
| - const String& encoded = String::Handle(String::EncodeURI(input));
|
| + const String& encoded = String::Handle(String::EncodeIRI(input));
|
| EXPECT(output.Equals(encoded));
|
| }
|
|
|
|
|
| -TEST_CASE(StringDecodeURI) {
|
| +TEST_CASE(StringDecodeIRI) {
|
| const char* kOutput =
|
| "file:///usr/local/johnmccutchan/workspace/dart-repo/dart/test.dart";
|
| const char* kInput =
|
| @@ -422,11 +422,26 @@
|
| "dart-repo%2Fdart%2Ftest.dart";
|
| const String& input = String::Handle(String::New(kInput));
|
| const String& output = String::Handle(String::New(kOutput));
|
| - const String& decoded = String::Handle(String::DecodeURI(input));
|
| + const String& decoded = String::Handle(String::DecodeIRI(input));
|
| EXPECT(output.Equals(decoded));
|
| }
|
|
|
|
|
| +TEST_CASE(StringIRITwoByte) {
|
| + const intptr_t kInputLen = 3;
|
| + const uint16_t kInput[kInputLen] = { 'x', '/', 256 };
|
| + const String& input = String::Handle(String::FromUTF16(kInput, kInputLen));
|
| + const intptr_t kOutputLen = 10;
|
| + const uint16_t kOutput[kOutputLen] =
|
| + { 'x', '%', '2', 'F', '%', 'C', '4', '%', '8', '0' };
|
| + const String& output = String::Handle(String::FromUTF16(kOutput, kOutputLen));
|
| + const String& encoded = String::Handle(String::EncodeIRI(input));
|
| + EXPECT(output.Equals(encoded));
|
| + const String& decoded = String::Handle(String::DecodeIRI(output));
|
| + EXPECT(input.Equals(decoded));
|
| +}
|
| +
|
| +
|
| TEST_CASE(Mint) {
|
| // On 64-bit architectures a Smi is stored in a 64 bit word. A Midint cannot
|
| // be allocated if it does fit into a Smi.
|
|
|