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

GTMAssertObjectImageEqualToImageNamed does not write files to User's desktop when Shared Build folder is set up #71

Open
GoogleCodeExporter opened this issue Aug 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Configure Xcode to use a shared build folder, nested somewhat deeply
2. Write a test using GTMAssertObjectImageEqualToImageNamed
3. Run the test in the iOS simulator to generate the reference image (first run)

What is the expected output? What do you see instead?
The image file is expected to be put on the current user's desktop.
However it is placed somewhere else, depending on the shared build output 
folder's location.

What version of the product are you using? On what operating system?
GTM SVN Rev 426.
iOS 4.2.1 / Xcode 3.2.5

Please provide any additional information below.
The problem is caused by the

 + (NSString *)gtm_getUnitTestSaveToDirectory 

method which assumes a certain nesting depth to find the desktop. I attached a 
proposed patch that - while not ideal either - fixes the problem probably for 
most users. It would not work if the user's home was located somewhere 
non-default.


Original issue reported on code.google.com by [email protected] on 20 Jan 2011 at 2:11

Attachments:

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

No branches or pull requests

1 participant