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

Side by Side Diff: test/codegen/expect/corelib/uri_scheme_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 unified diff | Download patch
« no previous file with comments | « test/codegen/expect/corelib/uri_query_test.js ('k') | test/codegen/expect/corelib/uri_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 dart_library.library('corelib/uri_scheme_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__uri_scheme_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 uri_scheme_test = Object.create(null);
11 let VoidToUri = () => (VoidToUri = dart.constFn(dart.definiteFunctionType(core .Uri, [])))();
12 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT ype(core.bool, [dart.dynamic])))();
13 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
14 let StringAndStringAndStringTodynamic = () => (StringAndStringAndStringTodynam ic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String, core.Str ing, core.String])))();
15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
16 uri_scheme_test.testInvalidArguments = function() {
17 expect$.Expect.throws(dart.fn(() => core.Uri.new({scheme: "_"}), VoidToUri() ), dart.fn(e => core.FormatException.is(e), dynamicTobool()));
18 expect$.Expect.throws(dart.fn(() => core.Uri.new({scheme: "http_s"}), VoidTo Uri()), dart.fn(e => core.FormatException.is(e), dynamicTobool()));
19 expect$.Expect.throws(dart.fn(() => core.Uri.new({scheme: "127.0.0.1:80"}), VoidToUri()), dart.fn(e => core.FormatException.is(e), dynamicTobool()));
20 };
21 dart.fn(uri_scheme_test.testInvalidArguments, VoidTovoid());
22 uri_scheme_test.testScheme = function() {
23 function test(expectedScheme, expectedUri, scheme) {
24 let uri = core.Uri.new({scheme: scheme});
25 expect$.Expect.equals(expectedScheme, uri.scheme);
26 expect$.Expect.equals(expectedUri, dart.toString(uri));
27 uri = core.Uri.parse(dart.str`${scheme}:`);
28 expect$.Expect.equals(expectedScheme, uri.scheme);
29 expect$.Expect.equals(expectedUri, dart.toString(uri));
30 }
31 dart.fn(test, StringAndStringAndStringTodynamic());
32 test("http", "http:", "http");
33 test("http", "http:", "HTTP");
34 test("http", "http:", "hTTP");
35 test("http", "http:", "Http");
36 test("http+ssl", "http+ssl:", "HTTP+ssl");
37 test("urn", "urn:", "urn");
38 test("urn", "urn:", "UrN");
39 test("a123.432", "a123.432:", "a123.432");
40 };
41 dart.fn(uri_scheme_test.testScheme, VoidTovoid());
42 uri_scheme_test.main = function() {
43 uri_scheme_test.testInvalidArguments();
44 uri_scheme_test.testScheme();
45 };
46 dart.fn(uri_scheme_test.main, VoidTodynamic());
47 // Exports:
48 exports.uri_scheme_test = uri_scheme_test;
49 });
OLDNEW
« no previous file with comments | « test/codegen/expect/corelib/uri_query_test.js ('k') | test/codegen/expect/corelib/uri_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698