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

Unified Diff: test/codegen/expect/corelib/string_trim_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/corelib/string_trim_test.js
diff --git a/test/codegen/expect/corelib/string_trim_test.js b/test/codegen/expect/corelib/string_trim_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..d55856fbfe01305a0e09dcb6d0192732e31c8f41
--- /dev/null
+++ b/test/codegen/expect/corelib/string_trim_test.js
@@ -0,0 +1,37 @@
+dart_library.library('corelib/string_trim_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__string_trim_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const string_trim_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ string_trim_test.StringTrimTest = class StringTrimTest extends core.Object {
+ static testMain() {
+ expect$.Expect.equals("", " "[dartx.trim]());
+ expect$.Expect.equals("", " "[dartx.trim]());
+ let a = " lots of space on the left";
+ expect$.Expect.equals("lots of space on the left", a[dartx.trim]());
+ a = "lots of space on the right ";
+ expect$.Expect.equals("lots of space on the right", a[dartx.trim]());
+ a = " lots of space ";
+ expect$.Expect.equals("lots of space", a[dartx.trim]());
+ a = " x ";
+ expect$.Expect.equals("x", a[dartx.trim]());
+ expect$.Expect.equals("", " \t \n \r "[dartx.trim]());
+ }
+ };
+ dart.setSignature(string_trim_test.StringTrimTest, {
+ statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
+ names: ['testMain']
+ });
+ string_trim_test.main = function() {
+ string_trim_test.StringTrimTest.testMain();
+ };
+ dart.fn(string_trim_test.main, VoidTodynamic());
+ // Exports:
+ exports.string_trim_test = string_trim_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/string_trim2_test.js ('k') | test/codegen/expect/corelib/string_trimlr_test_01_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698