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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/html/element_types_constructors4_test.dart

Issue 2416853003: Move minitest.dart into the expect package. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:html'; 5 import 'dart:html';
6 6
7 import 'package:minitest/minitest.dart'; 7 import 'package:expect/minitest.dart';
8 8
9 main() { 9 main() {
10 check(String name, bool fn(), [bool supported = true]) { 10 check(String name, bool fn(), [bool supported = true]) {
11 test(name, () { 11 test(name, () {
12 var expectation = supported ? returnsNormally : throws; 12 var expectation = supported ? returnsNormally : throws;
13 expect(() { 13 expect(() {
14 expect(fn(), isTrue); 14 expect(fn(), isTrue);
15 }, expectation); 15 }, expectation);
16 }); 16 });
17 } 17 }
18 18
19 group('constructors', () { 19 group('constructors', () {
20 check('p', () => new ParagraphElement() is ParagraphElement); 20 check('p', () => new ParagraphElement() is ParagraphElement);
21 check('param', () => new ParamElement() is ParamElement); 21 check('param', () => new ParamElement() is ParamElement);
22 check('pre', () => new PreElement() is PreElement); 22 check('pre', () => new PreElement() is PreElement);
23 check('progress', () => new ProgressElement() is ProgressElement, 23 check('progress', () => new ProgressElement() is ProgressElement,
24 ProgressElement.supported); 24 ProgressElement.supported);
25 check('q', () => new QuoteElement() is QuoteElement); 25 check('q', () => new QuoteElement() is QuoteElement);
26 check('script', () => new ScriptElement() is ScriptElement); 26 check('script', () => new ScriptElement() is ScriptElement);
27 check('select', () => new SelectElement() is SelectElement); 27 check('select', () => new SelectElement() is SelectElement);
28 check('shadow', 28 check('shadow',
29 () => new ShadowElement() is ShadowElement, ShadowElement.supported); 29 () => new ShadowElement() is ShadowElement, ShadowElement.supported);
30 check('source', () => new SourceElement() is SourceElement); 30 check('source', () => new SourceElement() is SourceElement);
31 check('span', () => new SpanElement() is SpanElement); 31 check('span', () => new SpanElement() is SpanElement);
32 check('style', () => new StyleElement() is StyleElement); 32 check('style', () => new StyleElement() is StyleElement);
33 }); 33 });
34 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698