forked from ruffle-rs/ruffle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avm2: Allow splice() on a Vector with fixed=true
- Loading branch information
Showing
5 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
tests/tests/swfs/avm2/vector_splice_fixed_bug_compat/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,28 @@ | ||
// compiled with mxmlc | ||
|
||
import flash.utils.getQualifiedClassName; | ||
import flash.utils.getTimer; | ||
import flash.utils.ByteArray; | ||
|
||
var v = new Vector.<int>(5, true); | ||
trace(v.length); | ||
try { | ||
v.push(123); | ||
} catch(e) { | ||
trace("push exception caught"); | ||
} | ||
v.splice(0, 3); | ||
trace("NO exception on splice") | ||
trace(v.length); | ||
|
||
package { | ||
import flash.display.MovieClip; | ||
import flash.text.TextField; | ||
|
||
public class Test extends MovieClip { | ||
public function Test(){ | ||
|
||
} | ||
} | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
tests/tests/swfs/avm2/vector_splice_fixed_bug_compat/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,4 @@ | ||
5 | ||
push exception caught | ||
NO exception on splice | ||
2 |
Binary file not shown.
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 |