Lightweight ActionScript 3 testing
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Makefile is a very lightweight ActionScript 3 testing library. It uses to print test results to standard output in a line-based format called Knock, which is a simplified version of TAP.

Here’s an example test:

package {
  import knock.*

  public class example_test extends Test {
    public function run(): void {
      eq(1 + 2, 3, "basic arithmetic")
      eq(1.1 + 2.2, 3.3, "floating-point math")

Let’s compile it using fcshc:

$ fcshc -lknock

And now we’ll run it, using run-stdio-swf:

$ run-stdio-swf example_test.swf
ok - basic arithmetic
not ok - floating-point math
# expected 3.3, got 3.3000000000000003

Pretty easy, right?