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

Issue 184103002: Support nested matchers in deep equality matching. (Closed)

Created:
6 years, 9 months ago by Bob Nystrom
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support nested matchers in deep equality matching. R=kevmoo@google.com, sigmund@google.com Committed: https://code.google.com/p/dart/source/detail?r=33164

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -73 lines) Patch
M pkg/unittest/lib/src/core_matchers.dart View 3 chunks +70 lines, -73 lines 4 comments Download
M pkg/unittest/lib/src/pretty_print.dart View 2 chunks +8 lines, -0 lines 3 comments Download
M pkg/unittest/test/matchers_test.dart View 2 chunks +19 lines, -0 lines 2 comments Download
M pkg/unittest/test/pretty_print_test.dart View 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Bob Nystrom
Equals supports deep matching, so you can do stuff like: expect(['a', {'b': 'c'}], equals(['a', {'b': ...
6 years, 9 months ago (2014-02-28 01:59:47 UTC) #1
kevmoo
But what if I want to test a Map that actually contains matchers? ;-) LGTM
6 years, 9 months ago (2014-02-28 02:39:56 UTC) #2
Siggi Cherem (dart-lang)
lgtm - nice cleanup https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/core_matchers.dart File pkg/unittest/lib/src/core_matchers.dart (right): https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/core_matchers.dart#newcode122 pkg/unittest/lib/src/core_matchers.dart:122: } since you are already ...
6 years, 9 months ago (2014-02-28 02:41:03 UTC) #3
kevmoo
Also: please update the changelog. :-)
6 years, 9 months ago (2014-02-28 16:24:52 UTC) #4
Bob Nystrom
Committed patchset #1 manually as r33164 (presubmit successful).
6 years, 9 months ago (2014-02-28 17:31:13 UTC) #5
Bob Nystrom
Thanks! https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/core_matchers.dart File pkg/unittest/lib/src/core_matchers.dart (right): https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/core_matchers.dart#newcode122 pkg/unittest/lib/src/core_matchers.dart:122: } On 2014/02/28 02:41:04, Siggi Cherem (dart-lang) wrote: ...
6 years, 9 months ago (2014-02-28 17:31:24 UTC) #6
Bob Nystrom
On 2014/02/28 16:24:52, kevmoo wrote: > But what if I want to test a Map ...
6 years, 9 months ago (2014-02-28 17:32:04 UTC) #7
Siggi Cherem (dart-lang)
6 years, 9 months ago (2014-02-28 17:37:18 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/pretty_...
File pkg/unittest/lib/src/pretty_print.dart (right):

https://codereview.chromium.org/184103002/diff/1/pkg/unittest/lib/src/pretty_...
pkg/unittest/lib/src/pretty_print.dart:7: import '../matcher.dart';
On 2014/02/28 17:31:24, Bob Nystrom wrote:
> On 2014/02/28 02:41:04, Siggi Cherem (dart-lang) wrote:
> > use package: ?
> 
> Do you think that's better? It seems a bit weird to do that when the next line
> doesn't.

Not really.

I think in general is a bad idea to use '../'. I feel that generally people have
a good understanding of what's deeper inside a package, but not so much of
what's above it.

Powered by Google App Engine
This is Rietveld 408576698