OLD | NEW |
(Empty) | |
| 1 dart_library.library('corelib/regexp/default_arguments_test', null, /* Imports *
/[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__default_arguments_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const default_arguments_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 default_arguments_test.main = function() { |
| 13 default_arguments_test.testCaseSensitive(); |
| 14 default_arguments_test.testMultiLine(); |
| 15 }; |
| 16 dart.fn(default_arguments_test.main, VoidTodynamic()); |
| 17 default_arguments_test.testCaseSensitive = function() { |
| 18 let r1 = core.RegExp.new('foo'); |
| 19 let r2 = core.RegExp.new('foo', {caseSensitive: true}); |
| 20 let r3 = core.RegExp.new('foo', {caseSensitive: false}); |
| 21 let r4 = core.RegExp.new('foo', {caseSensitive: null}); |
| 22 expect$.Expect.isNull(r1.firstMatch('Foo'), "r1.firstMatch('Foo')"); |
| 23 expect$.Expect.isNull(r2.firstMatch('Foo'), "r2.firstMatch('Foo')"); |
| 24 expect$.Expect.isNotNull(r3.firstMatch('Foo'), "r3.firstMatch('Foo')"); |
| 25 expect$.Expect.isNotNull(r4.firstMatch('Foo'), "r4.firstMatch('Foo')"); |
| 26 }; |
| 27 dart.fn(default_arguments_test.testCaseSensitive, VoidTodynamic()); |
| 28 default_arguments_test.testMultiLine = function() { |
| 29 let r1 = core.RegExp.new('^foo$'); |
| 30 let r2 = core.RegExp.new('^foo$', {multiLine: true}); |
| 31 let r3 = core.RegExp.new('^foo$', {multiLine: false}); |
| 32 let r4 = core.RegExp.new('^foo$', {multiLine: null}); |
| 33 expect$.Expect.isNull(r1.firstMatch('\nfoo\n'), "r1.firstMatch('\\nfoo\\n')"
); |
| 34 expect$.Expect.isNotNull(r2.firstMatch('\nfoo\n'), "r2.firstMatch('\\nfoo\\n
')"); |
| 35 expect$.Expect.isNull(r3.firstMatch('\nfoo\n'), "r3.firstMatch('\\nfoo\\n')"
); |
| 36 expect$.Expect.isNull(r4.firstMatch('\nfoo\n'), "r4.firstMatch('\\nfoo\\n')"
); |
| 37 }; |
| 38 dart.fn(default_arguments_test.testMultiLine, VoidTodynamic()); |
| 39 // Exports: |
| 40 exports.default_arguments_test = default_arguments_test; |
| 41 }); |
OLD | NEW |