Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

[dccd] NaN moves #1136

Closed
vicb opened this issue Jun 10, 2014 · 2 comments
Closed

[dccd] NaN moves #1136

vicb opened this issue Jun 10, 2014 · 2 comments

Comments

@vicb
Copy link
Contributor

vicb commented Jun 10, 2014

double.NAN moves could not be detected with the current implementation (at least for Collections, Map to be checked).

The reasons are:

  • DuplicateMap.remove assert(map.containsKey(record.item)) will fail for NaN,
  • _DuplicateItemRecordList.get uses identical while it should use the loose test.
@vicb
Copy link
Contributor Author

vicb commented Jun 10, 2014

      it('should detect [NaN] moves', () {
        var list = [double.NAN];
        var record = detector..watch(list, null, null)..collectChanges();

        list..clear()..addAll(['a', double.NAN]);
        record = detector..watch(list, null, null)..collectChanges();
        expect(detector.collectChanges().moveNext()).toEqual(true);
        expect(iterator.current.currentValue, toEqualCollectionRecord(
          // ...   
        ));
      });

@vicb
Copy link
Contributor Author

vicb commented Jun 10, 2014

vicb added a commit to vicb/angular.dart that referenced this issue Jun 12, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Jun 12, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Jun 12, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Jun 13, 2014
vicb added a commit to vicb/angular.dart that referenced this issue Jun 13, 2014
@vicb vicb closed this as completed in f01e286 Jul 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant