[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Testcases (was: [Gnash] Contributing)
From: |
strk |
Subject: |
Testcases (was: [Gnash] Contributing) |
Date: |
Thu, 9 Feb 2006 20:26:20 +0100 |
On Thu, Feb 09, 2006 at 09:04:43AM -0700, Rob Savoye wrote:
> Erik de Castro Lopo wrote:
>
> >We're particularly interested in the backend/gnash standalone
> >player and making sure that works well with the flash files
> >that we generate. Since we are generating our own flash
> >programs we will also be able to generate lots of small test
> >cases.
>
> I'd love to see more test cases. We've currently been using Ming's
> "makeswf" to generate test cases, but the more the merrier... If you
> think you'll be able to generate more than a few dozen test cases, you
> should make a new sub directory in "testsuite".
I'd keep the actionscript.all/ directory for tests with sources.
Better if only Ming-based so they have a common build rule.
A couple of words about Ming-based tests, in case anyone wants
to provide them. A test file would look like this:
#include "check.as"
// Test object creation
check(new Object() instanceOf Object);
// Test parseInt
check(isNaN(parseInt('none')));
// .. your tests here ...
You'd build it by running 'make MyTest.swf'
You'd run it with 'gprocessor -v MyTest.swf'
It will print PASSED or FAILED togheter with expression being evaluated,
filename and lineno.
Note that you can feed the tests to players not providing support
for the 'trace' function by building the "visual" version of them:
make MyTest.vswf
myflashplayer MyTest.vswf
PASSED or FAILED will then be printed in a TextField.
--strk;