Created
March 11, 2009 04:05
-
-
Save ryanfb/77307 to your computer and use it in GitHub Desktop.
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
proc assert_block {block {message "assert_block failed."}} { | |
if ![uplevel $block] { | |
error $message | |
} | |
} | |
proc assert_equal {expected actual {message ""}} { | |
set full_message [or $message "$expected expected but was\n$actual.\n"] | |
assert_block {expr {$expected eq $actual}} $full_message | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment