Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Unified Diff: runtime/vm/object_test.cc

Issue 98253009: Refactor VM service IDs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698