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

Unified Diff: pkg/dev_compiler/test/codegen/lib/html/svg_test.dart

Issue 2419863002: Remove uses of unittest in the HTML tests where possible. (Closed)
Patch Set: Remove TODO. 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 side-by-side diff with in-line comments
Download patch
Index: pkg/dev_compiler/test/codegen/lib/html/svg_test.dart
diff --git a/pkg/dev_compiler/test/codegen/lib/html/svg_test.dart b/pkg/dev_compiler/test/codegen/lib/html/svg_test.dart
index b24084ac3f648febd5e0648e1eca977ab1d91df0..0477852ac32459d680341aae52bb727f6b88d8f1 100644
--- a/pkg/dev_compiler/test/codegen/lib/html/svg_test.dart
+++ b/pkg/dev_compiler/test/codegen/lib/html/svg_test.dart
@@ -2,15 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library SVGTest;
import 'dart:html';
import 'dart:svg' as svg;
-import 'package:unittest/html_individual_config.dart';
-import 'package:unittest/unittest.dart';
-main() {
- useHtmlIndividualConfiguration();
+import 'package:expect/minitest.dart';
+main() {
group('svgPresence', () {
var isSvgElement = predicate((x) => x is svg.SvgElement, 'is a SvgElement');
@@ -42,8 +39,7 @@ main() {
</svg>
""");
- expect(logo, isSvgElement);
-
+ expect(logo, isSvgElement);
});
});
@@ -66,9 +62,13 @@ main() {
var isSvgElement = predicate((x) => x is svg.SvgElement, 'is a SvgElement');
var isSvgSvgElement =
predicate((x) => x is svg.SvgSvgElement, 'is a SvgSvgElement');
+ var isNotSvgSvgElement =
+ predicate((x) => x is! svg.SvgSvgElement, 'is not a SvgSvgElement');
var isNode = predicate((x) => x is Node, 'is a Node');
var isSvgNumber = predicate((x) => x is svg.Number, 'is a svg.Number');
+ var isNotSvgNumber = predicate((x) => x is! svg.Number, 'is not a svg.Number');
var isSvgRect = predicate((x) => x is svg.Rect, 'is a svg.Rect');
+ var isNotSvgRect = predicate((x) => x is! svg.Rect, 'is not a svg.Rect');
test('rect_isChecks', () {
var div = insertTestDiv();
@@ -80,9 +80,9 @@ main() {
expect(r, isNode);
// Interfaces not implemented.
- expect(r, isNot(isSvgNumber));
- expect(r, isNot(isSvgRect));
- expect(r, isNot(isSvgSvgElement));
+ expect(r, isNotSvgNumber);
+ expect(r, isNotSvgRect);
+ expect(r, isNotSvgSvgElement);
div.remove();
});

Powered by Google App Engine
This is Rietveld 408576698