Skip to content
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

Add section-object support to new tests, improve test confinement. #trivial #360

Merged
merged 1 commit into from
Jun 16, 2017

Conversation

Adlai-Holler
Copy link
Member

@Adlai-Holler Adlai-Holler commented Jun 14, 2017

  • Fix unit testing memory leaks caused by mock objects retaining their invocations, which retain their arguments, which may retain the mocks.
  • Automatically verify all mocks during [ASTestCase tearDown].
  • Add section-object testing to the new collection tests file.
  • Better encapsulate unit tests:
    • Ensure the autorelease pool is drained, and the dealloc queue is drained, inside of invokeTest:.
    • Ensure that view controllers aren't retained by windows after test ends (system may retain windows).
    • Break retain cycles: (mockObject -> invocations -> owner -> mockObject) by automatically registering all mocks created during tests, verifying them, then removing their saved invocations.
    • Manually verify that, as of now, no transient objects survive between test cases. No easy way to automate this verification.
  • Let Xcode move the ASAssert.m file reference that it seems to really want to move.
  • ASWeakSet: Use NSHashTable* constant names, instead of NSPointerFunctions*. This is shorter and it shows that we are compliant with the data structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant