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

Unified Diff: test/codegen/expect/language/reg_ex2_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/language/reg_ex2_test.js
diff --git a/test/codegen/expect/language/reg_ex2_test.js b/test/codegen/expect/language/reg_ex2_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..a8437c70ac0250640b3ad47f6b103ee55c10c701
--- /dev/null
+++ b/test/codegen/expect/language/reg_ex2_test.js
@@ -0,0 +1,37 @@
+dart_library.library('language/reg_ex2_test', null, /* Imports */[
+ 'dart_sdk'
+], function load__reg_ex2_test(exports, dart_sdk) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const reg_ex2_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ reg_ex2_test.RegEx2Test = class RegEx2Test extends core.Object {
+ static testMain() {
+ let helloPattern = core.RegExp.new("with (hello)");
+ let s = "this is a string with hello somewhere";
+ let match = helloPattern.firstMatch(s);
+ if (match != null) {
+ core.print("got match");
+ let groupCount = match.groupCount;
+ core.print(dart.str`groupCount is ${groupCount}`);
+ core.print(dart.str`group 0 is ${match.group(0)}`);
+ core.print(dart.str`group 1 is ${match.group(1)}`);
+ } else {
+ core.print("match not round");
+ }
+ core.print("done");
+ }
+ };
+ dart.setSignature(reg_ex2_test.RegEx2Test, {
+ statics: () => ({testMain: dart.definiteFunctionType(dart.void, [])}),
+ names: ['testMain']
+ });
+ reg_ex2_test.main = function() {
+ reg_ex2_test.RegEx2Test.testMain();
+ };
+ dart.fn(reg_ex2_test.main, VoidTodynamic());
+ // Exports:
+ exports.reg_ex2_test = reg_ex2_test;
+});
« no previous file with comments | « test/codegen/expect/language/refine_receiver_null_test.js ('k') | test/codegen/expect/language/reg_exp2_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698