mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-18 00:01:55 +00:00
DataProvider in tests for ASC2 compiled SWF
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.generators;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -76,11 +77,21 @@ public class AS3Generator {
|
||||
continue;
|
||||
}
|
||||
if (name.equals("run")) {
|
||||
if (name.equals("run")) {
|
||||
if (identifier.equals("standard")) {
|
||||
s.append("@Test(dataProvider = \"standardSwfNamesProvider\")\r\n");
|
||||
} else {
|
||||
s.append("@Test\r\n");
|
||||
}
|
||||
s.append("public void ");
|
||||
s.append(testMethodName);
|
||||
s.append(testMethodName);
|
||||
s.append("(){\r\ndecompileMethod(\"");
|
||||
s.append(identifier);
|
||||
if (identifier.equals("standard")) {
|
||||
s.append("(String swfUsed){\r\ndecompileMethod(swfUsed");
|
||||
} else {
|
||||
s.append("(){\r\ndecompileMethod(\"");
|
||||
s.append(identifier);
|
||||
s.append("\"");
|
||||
}
|
||||
s.append(",\"");
|
||||
s.append(lower);
|
||||
s.append("\", ");
|
||||
HighlightedTextWriter src = new HighlightedTextWriter(new CodeFormatting(), false);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,6 +12,7 @@
|
||||
<movie minorVersion="0" />
|
||||
<movie platform="Flash Player" />
|
||||
<movie background="#FFFFFF" />
|
||||
<movie preferredSDK="AIR 33.1.1;33.1.1;" />
|
||||
</output>
|
||||
<!-- Other classes to be compiled into your SWF -->
|
||||
<classpaths>
|
||||
@@ -27,8 +28,8 @@
|
||||
<option inline="False" />
|
||||
<option locale="" />
|
||||
<option loadConfig="" />
|
||||
<option optimize="True" />
|
||||
<option omitTraces="True" />
|
||||
<option optimize="False" />
|
||||
<option omitTraces="False" />
|
||||
<option showActionScriptWarnings="True" />
|
||||
<option showBindingWarnings="True" />
|
||||
<option showInvalidCSS="True" />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'26.01.2021'</value>
|
||||
<value>'29.01.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<!--Any modifications you make may be lost.-->
|
||||
<flex-config>
|
||||
<target-player>25.0</target-player>
|
||||
<benchmark>false</benchmark>
|
||||
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
|
||||
<compiler>
|
||||
<define append="true">
|
||||
<name>CONFIG::debug</name>
|
||||
@@ -16,7 +14,7 @@
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::timeStamp</name>
|
||||
<value>'26.01.2021'</value>
|
||||
<value>'29.01.2021'</value>
|
||||
</define>
|
||||
<define append="true">
|
||||
<name>CONFIG::air</name>
|
||||
|
||||
@@ -8,7 +8,8 @@ package tests
|
||||
var v:Vector.<String> = new Vector.<String>();
|
||||
v.push("hello");
|
||||
v[0] = "hi";
|
||||
v[5 * 8 - 39] = "hi2";
|
||||
var a:int = 5;
|
||||
v[a * 8 - 39] = "hi2";
|
||||
trace(v[0]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user