From b60df56157ee1fd0bd4938799bac05a62fda91a1 Mon Sep 17 00:00:00 2001 From: lookshe Date: Sat, 14 Mar 2015 20:45:20 +0100 Subject: initial commit from working version --- .../flash-src/com/hurlant/crypto/tests/TestCase.as | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as (limited to 'signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as') diff --git a/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as new file mode 100755 index 0000000..4be402b --- /dev/null +++ b/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/crypto/tests/TestCase.as @@ -0,0 +1,42 @@ +/** + * TestCase + * + * Embryonic unit test support class. + * Copyright (c) 2007 Henri Torgemane + * + * See LICENSE.txt for full license information. + */ +package com.hurlant.crypto.tests +{ + public class TestCase + { + public var harness:ITestHarness; + + public function TestCase(h:ITestHarness, title:String) { + harness = h; + harness.beginTestCase(title); + } + + + public function assert(msg:String, value:Boolean):void { + if (value) { +// TestHarness.print("+ ",msg); + return; + } + throw new Error("Test Failure:"+msg); + } + + public function runTest(f:Function, title:String):void { + harness.beginTest(title); + try { + f(); + } catch (e:Error) { + trace("EXCEPTION THROWN: "+e); + trace(e.getStackTrace()); + harness.failTest(e.toString()); + return; + } + harness.passTest(); + } + } +} \ No newline at end of file -- cgit v1.2.3