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

Issue 2912173002: Start adding unit tests for ClassHierarchy. (Closed)

Created:
3 years, 6 months ago by scheglov
Modified:
3 years, 6 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Start adding unit tests for ClassHierarchy. I need these tests in order to be sure that I understand expectations of the ClassHierarchy interface, and to be able to test a lazy implementation I'm going to create for incremental kernel generator. I moved lub_test tests into this wider test suite. Tests for forEachOverridePair() are not complete yet, just one path is tested. If there are any additional cases that you think should be covered, please let me know. R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/e94a8e136799bfdfa8c11861f07e08098680c107

Patch Set 1 #

Total comments: 4

Patch Set 2 : Replace package:test_reflective_loader with manually written runner. #

Patch Set 3 : Fix for _runTest(). #

Total comments: 11

Patch Set 4 : Rollback inlining JUnit and a tweak for TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+658 lines, -239 lines) Patch
M pkg/kernel/pubspec.yaml View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A pkg/kernel/test/class_hierarchy_test.dart View 1 2 3 1 chunk +657 lines, -0 lines 0 comments Download
D pkg/kernel/test/lub_test.dart View 1 chunk +0 lines, -239 lines 0 comments Download

Messages

Total messages: 12 (1 generated)
scheglov
3 years, 6 months ago (2017-05-30 21:58:22 UTC) #1
Paul Berry
Logic lgtm. However since this is kernel code, we should wait for approval from Kevin. ...
3 years, 6 months ago (2017-05-30 23:31:41 UTC) #2
Siggi Cherem (dart-lang)
I added some context about test_reflective_loader below. https://codereview.chromium.org/2912173002/diff/1/pkg/kernel/test/class_hierarchy_test.dart File pkg/kernel/test/class_hierarchy_test.dart (right): https://codereview.chromium.org/2912173002/diff/1/pkg/kernel/test/class_hierarchy_test.dart#newcode10 pkg/kernel/test/class_hierarchy_test.dart:10: import 'package:test_reflective_loader/test_reflective_loader.dart'; ...
3 years, 6 months ago (2017-05-31 00:32:16 UTC) #3
ahe
https://codereview.chromium.org/2912173002/diff/1/pkg/kernel/test/class_hierarchy_test.dart File pkg/kernel/test/class_hierarchy_test.dart (right): https://codereview.chromium.org/2912173002/diff/1/pkg/kernel/test/class_hierarchy_test.dart#newcode10 pkg/kernel/test/class_hierarchy_test.dart:10: import 'package:test_reflective_loader/test_reflective_loader.dart'; On 2017/05/31 00:32:16, Siggi Cherem (dart-lang) wrote: ...
3 years, 6 months ago (2017-05-31 11:23:47 UTC) #4
scheglov
If there are any comments about logic, or about TODO for getDispatchTarget() and abstract classes ...
3 years, 6 months ago (2017-05-31 15:43:06 UTC) #5
scheglov
PTAL
3 years, 6 months ago (2017-05-31 16:02:43 UTC) #6
ahe
On 2017/05/31 15:43:06, scheglov wrote: > If there are any comments about logic, or about ...
3 years, 6 months ago (2017-05-31 16:51:40 UTC) #7
ahe
lgtm I don't think inlining JUint is an optimal solution either. All my comments below ...
3 years, 6 months ago (2017-05-31 17:33:49 UTC) #8
scheglov
https://codereview.chromium.org/2912173002/diff/40001/pkg/kernel/test/class_hierarchy_test.dart File pkg/kernel/test/class_hierarchy_test.dart (right): https://codereview.chromium.org/2912173002/diff/40001/pkg/kernel/test/class_hierarchy_test.dart#newcode203 pkg/kernel/test/class_hierarchy_test.dart:203: // class C extends Object with B<int> {} On ...
3 years, 6 months ago (2017-05-31 17:53:28 UTC) #9
scheglov
Committed patchset #4 (id:60001) manually as e94a8e136799bfdfa8c11861f07e08098680c107 (presubmit successful).
3 years, 6 months ago (2017-05-31 18:31:43 UTC) #11
ahe
3 years, 6 months ago (2017-05-31 18:33:06 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2912173002/diff/40001/pkg/kernel/test/class_h...
File pkg/kernel/test/class_hierarchy_test.dart (right):

https://codereview.chromium.org/2912173002/diff/40001/pkg/kernel/test/class_h...
pkg/kernel/test/class_hierarchy_test.dart:601: //   E
On 2017/05/31 17:53:27, scheglov wrote:
> On 2017/05/31 17:33:49, ahe wrote:
> > I'm thinking it might be a good idea to add more complex hierarchies to this
> > test.
> 
> Sounds good to me.
> Anything specific you have in mind?

I'll discuss it with Johnni tomorrow. I can't remember the details, but I think
we've discussed it before.

https://codereview.chromium.org/2912173002/diff/40001/pkg/kernel/test/class_h...
pkg/kernel/test/class_hierarchy_test.dart:675: static void
_runTests(_ClassHierarchyTest newInstance()) {
On 2017/05/31 17:53:27, scheglov wrote:
> Given that this is considered as not an optimal solution either, I will roll
it
> back and leave using package:test_reflective_loader for now.

I agree.

Powered by Google App Engine
This is Rietveld 408576698