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

Unified Diff: test/codegen/expect/lib/convert/utf83_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/lib/convert/utf82_test.js ('k') | test/codegen/expect/lib/convert/utf84_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/lib/convert/utf83_test.js
diff --git a/test/codegen/expect/lib/convert/utf83_test.js b/test/codegen/expect/lib/convert/utf83_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..bd294d391bdc81e6ba8b21799465f792aef63804
--- /dev/null
+++ b/test/codegen/expect/lib/convert/utf83_test.js
@@ -0,0 +1,41 @@
+dart_library.library('lib/convert/utf83_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__utf83_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 utf83_test = Object.create(null);
+ let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(core.int)))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ utf83_test.main = function() {
+ expect$.Expect.equals("a", convert.UTF8.decode(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("a", convert.UTF8.decoder.convert(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("a", new convert.Utf8Decoder().convert(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("a", convert.UTF8.decode(JSArrayOfint().of([239, 187, 191, 97]), {allowMalformed: true}));
+ expect$.Expect.equals("a", new convert.Utf8Codec({allowMalformed: true}).decode(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("a", new convert.Utf8Codec({allowMalformed: true}).decoder.convert(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("a", new convert.Utf8Decoder({allowMalformed: true}).convert(JSArrayOfint().of([239, 187, 191, 97])));
+ expect$.Expect.equals("", convert.UTF8.decode(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("", convert.UTF8.decoder.convert(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("", new convert.Utf8Decoder().convert(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("", convert.UTF8.decode(JSArrayOfint().of([239, 187, 191]), {allowMalformed: true}));
+ expect$.Expect.equals("", new convert.Utf8Codec({allowMalformed: true}).decode(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("", new convert.Utf8Codec({allowMalformed: true}).decoder.convert(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("", new convert.Utf8Decoder({allowMalformed: true}).convert(JSArrayOfint().of([239, 187, 191])));
+ expect$.Expect.equals("a", convert.UTF8.decode(JSArrayOfint().of([97, 239, 187, 191])));
+ expect$.Expect.equals("a", convert.UTF8.decoder.convert(JSArrayOfint().of([97, 239, 187, 191])));
+ expect$.Expect.equals("a", new convert.Utf8Decoder().convert(JSArrayOfint().of([97, 239, 187, 191])));
+ expect$.Expect.equals("a", convert.UTF8.decode(JSArrayOfint().of([97, 239, 187, 191]), {allowMalformed: true}));
+ expect$.Expect.equals("a", new convert.Utf8Codec({allowMalformed: true}).decode(JSArrayOfint().of([97, 239, 187, 191])));
+ expect$.Expect.equals("a", new convert.Utf8Codec({allowMalformed: true}).decoder.convert(JSArrayOfint().of([97, 239, 187, 191])));
+ expect$.Expect.equals("a", new convert.Utf8Decoder({allowMalformed: true}).convert(JSArrayOfint().of([97, 239, 187, 191])));
+ };
+ dart.fn(utf83_test.main, VoidTodynamic());
+ // Exports:
+ exports.utf83_test = utf83_test;
+});
« no previous file with comments | « test/codegen/expect/lib/convert/utf82_test.js ('k') | test/codegen/expect/lib/convert/utf84_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698