-
-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add test for AVM1 ConvolutionFilter initialization
- Loading branch information
1 parent
d76bbf0
commit a30475e
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
tests/tests/swfs/visual/filters/avm1_convolution_initialization/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
1 | ||
0 | ||
true | ||
128 | ||
9 | ||
1,1,1,1,1,1,1,1,1 | ||
3 | ||
3 | ||
true | ||
0 | ||
0 | ||
true | ||
0 | ||
9 | ||
1,1,1,1,1,1,1,1,1 | ||
3 | ||
3 | ||
true |
31 changes: 31 additions & 0 deletions
31
tests/tests/swfs/visual/filters/avm1_convolution_initialization/test.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Compile with: mtasc -main -version 8 -header 200:150:30 -swf test.swf test.as | ||
|
||
// TODO: Incorporate this into a more comprehensive test of ConvolutionFilter | ||
|
||
import flash.filters.ConvolutionFilter; | ||
class Test { | ||
static function main() { | ||
// Initializing a ConvolutionFilter and specifying a color | ||
var convoTest = new ConvolutionFilter(3,3,[1,1,1,1,1,1,1,1,1],9,0,true,true,128); | ||
trace(convoTest.alpha); | ||
trace(convoTest.bias); | ||
trace(convoTest.clamp); | ||
trace(convoTest.color); | ||
trace(convoTest.divisor); | ||
trace(convoTest.matrix); | ||
trace(convoTest.matrixX); | ||
trace(convoTest.matrixY); | ||
trace(convoTest.preserveAlpha); | ||
// Initializing a ConvolutionFilter without specifying a color | ||
var convoTest2 = new ConvolutionFilter(3,3,[1,1,1,1,1,1,1,1,1],9,0,true,true); | ||
trace(convoTest2.alpha); | ||
trace(convoTest2.bias); | ||
trace(convoTest2.clamp); | ||
trace(convoTest2.color); | ||
trace(convoTest2.divisor); | ||
trace(convoTest2.matrix); | ||
trace(convoTest2.matrixX); | ||
trace(convoTest2.matrixY); | ||
trace(convoTest2.preserveAlpha); | ||
} | ||
} |
Binary file added
BIN
+410 Bytes
tests/tests/swfs/visual/filters/avm1_convolution_initialization/test.swf
Binary file not shown.
1 change: 1 addition & 0 deletions
1
tests/tests/swfs/visual/filters/avm1_convolution_initialization/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 1 |