Skip to content

Conversation

@rsgowman
Copy link
Member

Minor optimization (which is already present in the ts code).

http://b/36351543

Minor optimization (which is already present in the ts code).
XCTAssertEqual([results count], [expected count]);
for (FSTDocument *doc in expected) {
XCTAssertEqualObjects([results objectForKey:doc.key], doc);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO below is now no longer relevant, is it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Removed.

FSTDocumentDictionary *results = [self.remoteDocumentCache documentsMatchingQuery:query];
NSArray *expected =
@[ FSTTestDoc(@"b/1", kVersion, _kDocData, NO), FSTTestDoc(@"b/2", kVersion, _kDocData, NO) ];
XCTAssertEqual([results count], [expected count]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also port the comment from JS (which is a little more descriptive than we we have here).

// TODO(mikelehen): This just verifies that we do a prefix scan against the
// query path. We'll need more tests once we add index support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- remove now-redundant TODO
- add more descriptive text to the test (ported from ts code).
@rsgowman rsgowman merged commit 7936724 into master Nov 22, 2017
@rsgowman rsgowman deleted the rgowman-filter_documents_matching_query_by_prefix branch November 22, 2017 22:01
minafarid pushed a commit to minafarid/firebase-ios-sdk that referenced this pull request Jun 6, 2018
…#488)

Minor optimization (which is already present in the ts code).
paulb777 added a commit that referenced this pull request Aug 21, 2019
* Initial source drop - sync'd at 263414281

* Public headers

* Initial podspec and 1st pass at imports

* initial build fixes

* Successful library and tests build

* Two test failures left

* All unit tests pass

* Initial look at unused tests

* Fix macOS build (no need for import UIKit)

* style

* Add copyrights

* Use, obfuscate, and verify 2nd App plist

* fix some warnings

* Fix analyze issues

* Changelog updates

* Minor comment cleanup.
@firebase firebase locked and limited conversation to collaborators Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants