Skip to content

Import Spec tests #6525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 23, 2020
Merged

Import Spec tests #6525

merged 4 commits into from
Sep 23, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

Port of firebase/firebase-android-sdk#2000 (that's right - 2000!)

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@@ -195,6 +195,7 @@ @implementation FSTSyncEngineTestDriver {
IndexFreeQueryEngine _queryEngine;

int _snapshotsInSyncEvents;
int _waitForPendingWritesEvents;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this variable should be initialized to 0 in the init function, similar to _snapshotsInSyncEvents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done (but I didn't see the other initialization, so I added that as well)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I mistakenly thought line 289 was part of the initialization, but it's actually in its own reset function. My Objective-C knowledge is poor -- it could be the case that primitives are set to 0 automatically, I'm not sure (it wouldn't be the case in C++). So this initialization could be redundant (though shouldn't hurt).

Copy link
Contributor

Choose a reason for hiding this comment

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

Objective-C defaults all members to zero, so explicitly making that initialization is redundant.

https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Initialization/Initialization.html

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, Gil! Sebastian, sorry for the redundant comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed again.

@@ -195,6 +195,7 @@ @implementation FSTSyncEngineTestDriver {
IndexFreeQueryEngine _queryEngine;

int _snapshotsInSyncEvents;
int _waitForPendingWritesEvents;
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I mistakenly thought line 289 was part of the initialization, but it's actually in its own reset function. My Objective-C knowledge is poor -- it could be the case that primitives are set to 0 automatically, I'm not sure (it wouldn't be the case in C++). So this initialization could be redundant (though shouldn't hurt).

@schmidt-sebastian schmidt-sebastian merged commit 24a77d0 into master Sep 23, 2020
christibbs pushed a commit that referenced this pull request Sep 28, 2020
* Import Spec tests

* Init

* Add recovery specs

* Update FSTSyncEngineTestDriver.mm
@firebase firebase locked and limited conversation to collaborators Oct 24, 2020
@paulb777 paulb777 deleted the mrschmidt/specimport branch January 10, 2021 00:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants