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

Unified Diff: test/codegen/expect/corelib/string_source_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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 | « test/codegen/expect/corelib/string_runes_test.js ('k') | test/codegen/expect/corelib/string_split_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/corelib/string_source_test.js
diff --git a/test/codegen/expect/corelib/string_source_test.js b/test/codegen/expect/corelib/string_source_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..39e4170b96159191e137f7e70a9b1b15ca0640ca
--- /dev/null
+++ b/test/codegen/expect/corelib/string_source_test.js
@@ -0,0 +1,38 @@
+dart_library.library('corelib/string_source_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__string_source_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const _interceptors = dart_sdk._interceptors;
+ const convert = dart_sdk.convert;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const string_source_test = Object.create(null);
+ let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(core.int)))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ string_source_test.main = function() {
+ let base = "𐐒";
+ let strings = ["𐐒", "𐐒", core.String.fromCharCodes(JSArrayOfint().of([55297, 56338])), dart.notNull(base[dartx.get](0)) + dart.notNull(base[dartx.get](1)), dart.str`${base}`, dart.str`${base[dartx.get](0)}${base[dartx.get](1)}`, dart.str`${base[dartx.get](0)}${base[dartx.substring](1)}`, core.String.fromCharCodes(JSArrayOfint().of([66578])), ("a" + base)[dartx.substring](1), (() => {
+ let _ = new core.StringBuffer();
+ _.writeCharCode(55297);
+ _.writeCharCode(56338);
+ return _;
+ })().toString(), (() => {
+ let _ = new core.StringBuffer();
+ _.writeCharCode(66578);
+ return _;
+ })().toString(), convert.JSON.decode('"𐐒"'), core.Map.as(convert.JSON.decode('{"𐐒":[]}'))[dartx.keys][dartx.first]];
+ for (let string of strings) {
+ core.String._check(string);
+ expect$.Expect.equals(base[dartx.length], string[dartx.length]);
+ expect$.Expect.equals(base, string);
+ expect$.Expect.equals(dart.hashCode(base), dart.hashCode(string));
+ expect$.Expect.listEquals(base[dartx.codeUnits][dartx.toList](), string[dartx.codeUnits][dartx.toList]());
+ }
+ };
+ dart.fn(string_source_test.main, VoidTodynamic());
+ // Exports:
+ exports.string_source_test = string_source_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/string_runes_test.js ('k') | test/codegen/expect/corelib/string_split_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698