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

Unified Diff: test/codegen/expect/corelib/regexp/default_arguments_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/regexp/default_arguments_test.js
diff --git a/test/codegen/expect/corelib/regexp/default_arguments_test.js b/test/codegen/expect/corelib/regexp/default_arguments_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..41368a43e6b35451343f0f008e45edea607a05a5
--- /dev/null
+++ b/test/codegen/expect/corelib/regexp/default_arguments_test.js
@@ -0,0 +1,41 @@
+dart_library.library('corelib/regexp/default_arguments_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__default_arguments_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 default_arguments_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ default_arguments_test.main = function() {
+ default_arguments_test.testCaseSensitive();
+ default_arguments_test.testMultiLine();
+ };
+ dart.fn(default_arguments_test.main, VoidTodynamic());
+ default_arguments_test.testCaseSensitive = function() {
+ let r1 = core.RegExp.new('foo');
+ let r2 = core.RegExp.new('foo', {caseSensitive: true});
+ let r3 = core.RegExp.new('foo', {caseSensitive: false});
+ let r4 = core.RegExp.new('foo', {caseSensitive: null});
+ expect$.Expect.isNull(r1.firstMatch('Foo'), "r1.firstMatch('Foo')");
+ expect$.Expect.isNull(r2.firstMatch('Foo'), "r2.firstMatch('Foo')");
+ expect$.Expect.isNotNull(r3.firstMatch('Foo'), "r3.firstMatch('Foo')");
+ expect$.Expect.isNotNull(r4.firstMatch('Foo'), "r4.firstMatch('Foo')");
+ };
+ dart.fn(default_arguments_test.testCaseSensitive, VoidTodynamic());
+ default_arguments_test.testMultiLine = function() {
+ let r1 = core.RegExp.new('^foo$');
+ let r2 = core.RegExp.new('^foo$', {multiLine: true});
+ let r3 = core.RegExp.new('^foo$', {multiLine: false});
+ let r4 = core.RegExp.new('^foo$', {multiLine: null});
+ expect$.Expect.isNull(r1.firstMatch('\nfoo\n'), "r1.firstMatch('\\nfoo\\n')");
+ expect$.Expect.isNotNull(r2.firstMatch('\nfoo\n'), "r2.firstMatch('\\nfoo\\n')");
+ expect$.Expect.isNull(r3.firstMatch('\nfoo\n'), "r3.firstMatch('\\nfoo\\n')");
+ expect$.Expect.isNull(r4.firstMatch('\nfoo\n'), "r4.firstMatch('\\nfoo\\n')");
+ };
+ dart.fn(default_arguments_test.testMultiLine, VoidTodynamic());
+ // Exports:
+ exports.default_arguments_test = default_arguments_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/regexp/constructor_test.js ('k') | test/codegen/expect/corelib/regexp/dotstar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698