jmpeek454 / google-toolbox-for-mac

Automatically exported from code.google.com/p/google-toolbox-for-mac
Apache License 2.0
0 stars 0 forks source link

Tests in abstract test case not executed by subclasses #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a GTMTestCase containing the name "AbstractTest" so that its tests 
will not be run.
2. Create a failing test.
3. Define a subclass of the abstract test class.

What is the expected output? What do you see instead?
- Expect to see test failure, verifying that the failing test in AbstractTest 
was inherited.
- Instead, the test is not executed by the subclass.

What version of the product are you using? On what operating system?
- r404 on iOS

Please provide any additional information below.
- The +testInvocations method in GTMSenTestCase.m calls class_copyMethodList. 
Apple's documentation says, "Any instance methods implemented by superclasses 
are not included." I believe this applies to both iOS and Mac OS X, but have 
not tested it on Mac OS X.

Original issue reported on code.google.com by jon.m.r...@gmail.com on 18 Nov 2010 at 10:04

GoogleCodeExporter commented 9 years ago
Apple's docs or you mean the GTM docs? 
(http://code.google.com/p/google-toolbox-for-mac/wiki/CodeVerificationAndUnitTes
ting)

Do you have a sample project you can attach?

Original comment by thoma...@gmail.com on 18 Nov 2010 at 10:09

GoogleCodeExporter commented 9 years ago
Actually, this probably only hits iOS because SenTest probably does this right.

Dave - Looks like we need that base version to walk up the class tree 
collecting methods, no?

Original comment by thoma...@gmail.com on 18 Nov 2010 at 10:14

GoogleCodeExporter commented 9 years ago
Yep, Jon and I talked about it. Should probably get GTMUnitTestTesting stuff 
running on iOS.

Original comment by dmaclach on 18 Nov 2010 at 10:27

GoogleCodeExporter commented 9 years ago
I'm pretty swamped right now with Chrome stuff... if only there was somebody 
playing with iOS ;-)

Original comment by dmaclach on 18 Nov 2010 at 10:28

GoogleCodeExporter commented 9 years ago
I mean Apple's docs for the Obj-C runtime.

I'm attaching a sample project.

Original comment by jon.m.r...@gmail.com on 18 Nov 2010 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed. Just wait a bit for the code to actually sync over to the external 
servers.

Original comment by dmaclach on 19 Nov 2010 at 9:04