c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
16 lines
272 B
Bash
16 lines
272 B
Bash
# Always failing assertion with a message.
|
|
#
|
|
# Example:
|
|
# fail "It should have been but it wasn't to be"
|
|
function fail() {
|
|
echo "$1"
|
|
exit 1
|
|
}
|
|
|
|
|
|
function assertStringEqual {
|
|
|
|
if ! diff <(echo "$1") <(echo "$2") ; then
|
|
fail "Strings differ"
|
|
fi
|
|
}
|