unit.TestRunner

TestRunner

package haxe-unit

Available on all platforms

This class runs unit test cases and prints the result.

var r = new haxe.unit.TestRunner();
r.add(new MyTestCase());
// add other TestCases here

// finally, run the tests
r.run();

See:

Constructor

new ()

Variables

read only result:TestResult

The unit test results. Available after the run() is called.

Methods

add (c:TestCase):Void

Add TestCase instances to the unit test.

run ():Bool

Runs the unit tests and prints the results.

Returns:

true if the unit test succesfully executed the test cases.

Static methods

static dynamic print (v:Dynamic):Void

Prints the given object/value.

Flash outputs the result in a new TextField on stage. JavaScript outputs the result using console.log. Other targets use native print to output the result.

	This function is `dynamic` so it can be overriden in custom setups.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/haxe/unit/TestRunner.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部