• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unit Testing not displaying failed case text/line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unit Testing not displaying failed case text/line


  • Subject: Re: Unit Testing not displaying failed case text/line
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 19 Mar 2008 09:51:17 -0700

On Mar 19, 2008, at 8:34 AM, David Bainbridge wrote:
   STAssertEquals(0, [aNumber intValue],
                  @"The number is not zero!",
                  [aNumber intValue]);


Why does it not display the text from the STAssertEquals that fails?

Try this instead:

    STAssertEquals(0, [aNumber intValue],
                   @"The number is not zero, it's %d!",
                   [aNumber intValue]);

The third parameter to the macro is always a format string.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Unit Testing not displaying failed case text/line
      • From: David Bainbridge <email@hidden>
References: 
 >Unit Testing not displaying failed case text/line (From: David Bainbridge <email@hidden>)

  • Prev by Date: Trying to embed Ruby - How are frameworks discovered
  • Next by Date: Re: Trying to embed Ruby - How are frameworks discovered
  • Previous by thread: Unit Testing not displaying failed case text/line
  • Next by thread: Re: Unit Testing not displaying failed case text/line
  • Index(es):
    • Date
    • Thread