diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 6345a625c1..3244913a36 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -192,6 +192,22 @@ module Test assert obj.nil?, msg end + ## + # Fails unless +obj+ is true + + def assert_true obj, msg = nil + msg = message(msg) { "Expected #{mu_pp(obj)} to be true" } + assert obj == true, msg + end + + ## + # Fails unless +obj+ is false + + def assert_false obj, msg = nil + msg = message(msg) { "Expected #{mu_pp(obj)} to be false" } + assert obj == false, msg + end + ## # For testing with binary operators. #