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

Side by Side Diff: test/unminified_test.dart

Issue 935923002: Re-add minified/unminified tests. (Closed) Base URL: git@github.com:dart-lang/matcher@master
Patch Set: Created 5 years, 10 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
« test/test_utils.dart ('K') | « test/test_utils.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 // This file is for matcher tests that rely on the names of various Dart types.
6 // These tests will fail when run in minified dart2js, since the names will be
7 // mangled. A version of this file that works in minified dart2js is in
8 // matchers_minified_test.dart.
9
10 import 'package:matcher/matcher.dart';
11 import 'package:unittest/unittest.dart';
12
kevmoo 2015/02/18 04:11:08 need to import 'test_utils.dart'
nweiz 2015/02/19 00:31:08 Done.
13 void main() {
14 group('Iterable Matchers', () {
15 test('isEmpty', () {
16 var d = new SimpleIterable(0);
17 var e = new SimpleIterable(1);
18 shouldPass(d, isEmpty);
19 shouldFail(e, isEmpty, "Expected: empty "
20 "Actual: SimpleIterable:[1]");
21 });
22
23 test('isNotEmpty', () {
24 var d = new SimpleIterable(0);
25 var e = new SimpleIterable(1);
26 shouldPass(e, isNotEmpty);
27 shouldFail(d, isNotEmpty, "Expected: non-empty "
28 "Actual: SimpleIterable:[]");
29 });
30
31 test('contains', () {
32 var d = new SimpleIterable(3);
33 shouldPass(d, contains(2));
34 shouldFail(d, contains(5), "Expected: contains <5> "
35 "Actual: SimpleIterable:[3, 2, 1]");
36 });
37 });
38
39 group('Feature Matchers', () {
40 test("Feature Matcher", () {
41 var w = new Widget();
42 w.price = 10;
43 shouldPass(w, new HasPrice(10));
44 shouldPass(w, new HasPrice(greaterThan(0)));
45 shouldFail(w, new HasPrice(greaterThan(10)),
46 "Expected: Widget with a price that is a value greater than <10> "
47 "Actual: <Instance of 'Widget'> "
48 "Which: has price with value <10> which is not "
49 "a value greater than <10>");
50 });
51 });
52 }
OLDNEW
« test/test_utils.dart ('K') | « test/test_utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698