Skip to content

Commit

Permalink
tool/run: introduce generalized 'assert'-proc
Browse files Browse the repository at this point in the history
Issue #5432
  • Loading branch information
rite committed Jan 22, 2025
1 parent d631b42 commit 0dd3bf1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tool/run/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ proc strip_whitespace {string} {
}


##
# Check if the specified requirement is satisfied
#
proc assert {expression} {
if {![expr $expression]} {
puts stderr "Test requires '$expression'"
exit 1
}
}


##
# Check if the specified spec requirement is satisfied
#
Expand Down

0 comments on commit 0dd3bf1

Please sign in to comment.