Redis test: when assertion fails print not just the expression but also expanded values in the error message.

This commit is contained in:
antirez 2011-12-21 09:23:22 +01:00
parent ca9ba394ca
commit 9b63d1d81e

View File

@ -5,7 +5,7 @@ set ::tests_failed {}
proc assert {condition} {
if {![uplevel 1 expr $condition]} {
error "assertion:Expected condition '$condition' to be true"
error "assertion:Expected condition '$condition' to be true ([uplevel 1 [list subst -nocommands $condition]])"
}
}