Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assertions Doubt

 
Jas Oberai
Ranch Hand
Posts: 231
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have some doubt understanding these statement,can someone please throw in some simple example(code) for each of these cases:
case1:The assert statement is being used to check a postcondition--
something that must be true when the method completes successfully.

Case2:The assert statement is being used to check a class invariant--
something that must be true about each instance of the class.

Case3:The assert statements are being used to check a precondition--
something that must be true when the method is invoked.

Thanks in Advance!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic