1 This directory contains tests using the tracing functionality of Actionscript.
5 ../swfdec-test [FILE1 [FILE2 [...]]]
6 The default script in this directory takes all files on the command line or all
7 files in the current directory and runs them. Running consists of instancing a
8 SwfdecPlayer and iterating $FILE until 10 frames have passed. Everytime the
9 trace function is invoked by that player, its output is appended to a buffer.
10 Finally the captured output is compared to the file $FILE.trace. If the output
11 matches, the test succeeded for the given file, otherwise it failed. In this
12 case a diff is produced and dumped to stdout. The captured trace output is
13 written to a file named "tmp". The return value is 0 if all tests passed, or
14 failure if at least one test failed.
17 What are all the other files?
19 Some test files are created with Open Source tools. In that case, the sources
20 used for creating them are included and named $FILE.$TOOL-EXTENSION. Every
21 one of those files includes the command that were used for creating the test
25 Why don't you autogenerate the SWF files from sources but include them?
27 An important thing to note is that this testsuite is supposed to test the
28 correct handling of SWF files, so the reference file must be an SWF file. Since
29 Open Source tools could produce different SWF files depending on their version,
30 the testsuite could end up testing different files. This is something that is
31 definitely not wanted. Consider the source files annotations only.
34 How do I run my new test?
36 Create a file to test, say "test.swf", and put the expected output in the
37 corresponding trace file, in this case "test.swf.trace". After that, just call
38 the test application with your file, like this:
39 ../swfdec-test test.swf
42 How do I create a trace file?
44 The suggested method is to use a Flash debugging player and configure that
45 player to dump the trace poutput to a file. An example of how to do this can be
46 found at http://blogs.gnome.org/otte/2007/06/10/how-to-do-tests/
49 How do I add a test to the testsuite?
51 Just put the file, its trace file and if you have them, source files used for
52 creating the file into this directory and add all of them to EXTRA_DIST in
53 Makefile.am. The file should appear in the output when running make check.