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

Unified Diff: runtime/observatory/test/string_escaping_test.dart

Issue 839543002: Revert "Build Observatory with runtime" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « runtime/observatory/test/mirror_references_test.dart ('k') | runtime/observatory/test/test_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/test/string_escaping_test.dart
diff --git a/runtime/observatory/test/string_escaping_test.dart b/runtime/observatory/test/string_escaping_test.dart
deleted file mode 100644
index 3b73a8c4ca38a1862a76583e5c14a8e5ba47c763..0000000000000000000000000000000000000000
--- a/runtime/observatory/test/string_escaping_test.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library string_escaping_test;
-
-import 'dart:async';
-import 'dart:mirrors';
-import 'package:observatory/service_io.dart';
-import 'package:unittest/unittest.dart';
-import 'test_helper.dart';
-
-var ascii;
-var latin1;
-var unicode;
-var hebrew;
-var singleQuotes;
-var doubleQuotes;
-var newLines;
-var tabs;
-var suggrogatePairs;
-var nullInTheMiddle;
-var escapedUnicodeEscape;
-var longStringEven;
-var longStringOdd;
-var malformedWithLeadSurrogate;
-var malformedWithTrailSurrogate;
-
-void script() {
- ascii = "Hello, World!";
- latin1 = "blåbærgrød";
- unicode = "Îñţérñåţîöñåļîžåţîờñ";
- hebrew = "שלום רב שובך צפורה נחמדת"; // Right-to-left text.
- singleQuotes = "'One,' he said.";
- doubleQuotes = '"Two," he said.';
- newLines = "Windows\r\nSmalltalk\rUnix\n";
- tabs = "One\tTwo\tThree";
- suggrogatePairs = "1𝄞2𝄞𝄞3𝄞𝄞𝄞";
- nullInTheMiddle = "There are four\u0000 words.";
- escapedUnicodeEscape = "Should not be A: \\u0041";
-
- // A surrogate pair will cross the preferred truncation boundry.
- longStringEven = "..";
- for (int i = 0; i < 512; i++) longStringEven += "𝄞";
- longStringOdd = ".";
- for (int i = 0; i < 512; i++) longStringOdd += "𝄞";
-
- malformedWithLeadSurrogate = "before" + "𝄞"[0] + "after";
- malformedWithTrailSurrogate = "before" + "𝄞"[1] + "after";
-}
-
-var tests = [
-
-(Isolate isolate) =>
- isolate.rootLib.load().then((Library lib) {
- expectFullString(String varName, String varValueAsString) {
- Field field = lib.variables.singleWhere((v) => v.name == varName);
- Instance value = field.value;
- expect(value.valueAsString, equals(varValueAsString));
- expect(value.valueAsStringIsTruncated, isFalse);
- }
- expectTruncatedString(String varName, String varValueAsString) {
- Field field = lib.variables.singleWhere((v) => v.name == varName);
- Instance value = field.value;
- expect(varValueAsString, startsWith(value.valueAsString));
- expect(value.valueAsStringIsTruncated, isTrue);
- }
-
- script(); // Need to initialize variables in the testing isolate.
- expectFullString('ascii', ascii);
- expectFullString('latin1', latin1);
- expectFullString('unicode', unicode);
- expectFullString('hebrew', hebrew);
- expectFullString('singleQuotes', singleQuotes);
- expectFullString('doubleQuotes', doubleQuotes);
- expectFullString('newLines', newLines);
- expectFullString('tabs', tabs);
- expectFullString('suggrogatePairs', suggrogatePairs);
- expectFullString('nullInTheMiddle', nullInTheMiddle);
- expectTruncatedString('longStringEven', longStringEven);
- expectTruncatedString('longStringOdd', longStringOdd);
- expectFullString('malformedWithLeadSurrogate', malformedWithLeadSurrogate);
- expectFullString('malformedWithTrailSurrogate', malformedWithTrailSurrogate);
- }),
-
-];
-
-main(args) => runIsolateTests(args, tests, testeeBefore: script);
« no previous file with comments | « runtime/observatory/test/mirror_references_test.dart ('k') | runtime/observatory/test/test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698