OSDN Git Service

2001-08-22 Ben Elliston <bje@redhat.com>
authorbje <bje>
Wed, 22 Aug 2001 05:32:17 +0000 (05:32 +0000)
committerbje <bje>
Wed, 22 Aug 2001 05:32:17 +0000 (05:32 +0000)
* config/default.exp (sid_assert): New proc.

sid/component/testsuite/ChangeLog
sid/component/testsuite/config/default.exp

index d9467a8..dbf9d1a 100644 (file)
@@ -1,3 +1,7 @@
+2001-08-22  Ben Elliston  <bje@redhat.com>
+
+       * config/default.exp (sid_assert): New proc.
+
 2001-08-02  John Healy  <jhealy@redhat.com>
 
        * lib/cpudefs.exp (run-sid-tests-raw): Renamed loader to cpu-loader.
index 9917e1a..93b6a18 100644 (file)
@@ -191,6 +191,12 @@ proc sid_cmd { cmd } {
     return $decoded
 }
 
+# assert a general predicate.
+# pass or fail the DejaGnu test based on the result.
+proc sid_assert {predicate} {
+    global test
+    if $predicate { pass $test } else { fail $test }
+}
 
 # call a command; ignore result (but assert that it's not an ERROR.)
 proc sid_assert_success {cmd} {