4 * Embryonic unit test support class.
\r
5 * Copyright (c) 2007 Henri Torgemane
\r
7 * See LICENSE.txt for full license information.
\r
9 package com.hurlant.crypto.tests
\r
11 public class TestCase
\r
13 public var harness:ITestHarness;
\r
15 public function TestCase(h:ITestHarness, title:String) {
\r
17 harness.beginTestCase(title);
\r
21 public function assert(msg:String, value:Boolean):void {
\r
23 // TestHarness.print("+ ",msg);
\r
26 throw new Error("Test Failure:"+msg);
\r
29 public function runTest(f:Function, title:String):void {
\r
30 harness.beginTest(title);
\r
34 trace("EXCEPTION THROWN: "+e);
\r
35 trace(e.getStackTrace());
\r
36 harness.failTest(e.toString());
\r