Chromium Code Reviews| Index: runtime/vm/object_test.cc |
| diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc |
| index 00c19bd8876a95586ce611bb8a938334aa0ee78e..97a0fc75cdfbf63642bf80e62d8493d069d946c2 100644 |
| --- a/runtime/vm/object_test.cc |
| +++ b/runtime/vm/object_test.cc |
| @@ -332,6 +332,32 @@ TEST_CASE(StringCompareTo) { |
| } |
| +TEST_CASE(StringEncodeURI) { |
| + const char* kInput = |
| + "file:///usr/local/johnmccutchan/workspace/dart-repo/dart/test.dart"; |
| + const char* kOutput = |
| + "file%3A%2F%2F%2Fusr%2Flocal%2Fjohnmccutchan%2Fworkspace%2F" |
| + "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)); |
| + EXPECT(output.Equals(encoded)); |
| +} |
| + |
| + |
| +TEST_CASE(StringDecodeURI) { |
| + const char* kOutput = |
| + "file:///usr/local/johnmccutchan/workspace/dart-repo/dart/test.dart"; |
| + const char* kInput = |
| + "file%3A%2F%2F%2Fusr%2Flocal%2Fjohnmccutchan%2Fworkspace%2F" |
| + "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)); |
| + EXPECT(output.Equals(decoded)); |
| +} |
| + |
| + |
|
turnidge
2013/12/19 20:39:29
Add heartbeat (simple) tests for Find{Function/Clo
Cutch
2013/12/19 21:53:58
Done.
|
| 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. |