Created
December 23, 2011 21:46
-
-
Save SeanTAllen/1515445 to your computer and use it in GitHub Desktop.
New Assertion.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Redline Smalltalk, Copyright (c) James C. Ladd. All rights reserved. See LICENSE in the root of this distribution " | |
Object < #Assertion | |
+ assert: anObject equals: expectedObject withMessage: aString | |
anObject = expectedObject ifFalse: [ Object error: aString ]. | |
+ assert: anObject notEqualTo: unexpectedObject withMessage: aString | |
anObject = unexpectedObject ifFalse: [ Object error: aString ]. | |
+ assertTrue: aBlock withMessage: aString | |
aBlock value ifFalse: [ Object error: aString ]. | |
+ assertFalse: aBlock withMessage: aString | |
aBlock value ifTrue: [ Object error: aString ]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment