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

Unified Diff: test/codegen/expect/lib/html/typed_arrays_4_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
Index: test/codegen/expect/lib/html/typed_arrays_4_test.js
diff --git a/test/codegen/expect/lib/html/typed_arrays_4_test.js b/test/codegen/expect/lib/html/typed_arrays_4_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..257be583f9498129b4d85f173a89fae2fdf65264
--- /dev/null
+++ b/test/codegen/expect/lib/html/typed_arrays_4_test.js
@@ -0,0 +1,49 @@
+dart_library.library('lib/html/typed_arrays_4_test', null, /* Imports */[
+ 'dart_sdk',
+ 'unittest'
+], function load__typed_arrays_4_test(exports, dart_sdk, unittest) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const html = dart_sdk.html;
+ const typed_data = dart_sdk.typed_data;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const html_config = unittest.html_config;
+ const unittest$ = unittest.unittest;
+ const src__matcher__expect = unittest.src__matcher__expect;
+ const typed_arrays_4_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ typed_arrays_4_test.main = function() {
+ html_config.useHtmlConfiguration();
+ if (!dart.test(html.Platform.supportsTypedData)) {
+ return;
+ }
+ unittest$.test('indexOf_dynamic', dart.fn(() => {
+ let a1 = typed_data.Uint8List.new(1024);
+ for (let i = 0; i < dart.notNull(a1[dartx.length]); i++) {
+ a1[dartx.set](i, i);
+ }
+ src__matcher__expect.expect(a1[dartx.indexOf](50), 50);
+ src__matcher__expect.expect(a1[dartx.indexOf](50, 50), 50);
+ src__matcher__expect.expect(a1[dartx.indexOf](50, 51), 256 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50), 768 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50, 768 + 50), 768 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50, 768 + 50 - 1), 512 + 50);
+ }, VoidTodynamic()));
+ unittest$.test('indexOf_typed', dart.fn(() => {
+ let a1 = typed_data.Uint8List.new(1024);
+ for (let i = 0; i < dart.notNull(a1[dartx.length]); i++) {
+ a1[dartx.set](i, i);
+ }
+ src__matcher__expect.expect(a1[dartx.indexOf](50), 50);
+ src__matcher__expect.expect(a1[dartx.indexOf](50, 50), 50);
+ src__matcher__expect.expect(a1[dartx.indexOf](50, 51), 256 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50), 768 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50, 768 + 50), 768 + 50);
+ src__matcher__expect.expect(a1[dartx.lastIndexOf](50, 768 + 50 - 1), 512 + 50);
+ }, VoidTodynamic()));
+ };
+ dart.fn(typed_arrays_4_test.main, VoidTodynamic());
+ // Exports:
+ exports.typed_arrays_4_test = typed_arrays_4_test;
+});
« no previous file with comments | « test/codegen/expect/lib/html/typed_arrays_3_test.js ('k') | test/codegen/expect/lib/html/typed_arrays_5_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698