Sha256: aa648993dbb8e02447c76f1657f30de04402f08260455cf8d840e30e70a0fa4c

Contents?: true

Size: 971 Bytes

Versions: 28

Compression:

Stored size: 971 Bytes

Contents

import com.asunit.framework.*;
import com.asunit.util.*;

class com.asunit.framework.TestRunner extends Array {
	public static var localConn:LocalConnClient;
	private var intervalId:Number;
	private var interval:Number = 10;
	private var tests:Array;

	private static function getLocalConn():LocalConnClient {
		if(localConn == null) {
			localConn = LocalConnGateway.createClient("_AsUnitTestRunner");
			localConn["clearTestDisplay"]();
		}
		return localConn;
	}

	public function TestRunner() {
		tests = new Array();
	}

	public function push(item:Object):Number {
		var num:Number = tests.push(item);
		clearInterval(intervalId);

		if(num > 100) {
			renderTests();
		} else {
			intervalId = setInterval(this, "renderTests", interval);
		}
		return num;
	}

	public function renderTests():Void {
		clearInterval(intervalId);
		var lc:LocalConnClient = getLocalConn();
		lc["addTests"](tests);
		tests = new Array();
	}
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
asproject-0.1.28 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.30 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.27 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.21 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.31 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.29 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.34 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.32 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.36 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.33 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.37 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.35 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.40 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.41 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.42 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.43 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.38 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.44 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.60 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as
asproject-0.1.68 templates/asproject/asunit2/project/lib/asunit/com/asunit/framework/TestRunner.as