Mercurial > hg > may
changeset 400:fe47d9e8f596 resample
Add assert
author | Chris Cannam |
---|---|
date | Fri, 27 Sep 2013 12:32:53 +0100 |
parents | ac828725aeae |
children | a4e4e9dc8e46 |
files | src/may/test/test.yeti |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/may/test/test.yeti Thu Sep 26 15:04:45 2013 +0100 +++ b/src/may/test/test.yeti Fri Sep 27 12:32:53 2013 +0100 @@ -4,6 +4,15 @@ var goodCompares = 0; +assert fact description = + if fact then + goodCompares := goodCompares + 1; + true; + else + println "** assertion failed: \(description)"; + false; + fi; + compareUsing comparator obtained expected = if comparator obtained expected then goodCompares := goodCompares + 1; @@ -49,7 +58,7 @@ bad); { - compare, compareUsing, + compare, compareUsing, assert, time, runTests, }