Permalink
Browse files

Replaced CRLF line endings with LF as per instructions found here: ht…

  • Loading branch information...
1 parent 683acdc commit 6615297ba0225cda02c19ac00319ebb0c4ff6fee @lukebayes lukebayes committed Jan 19, 2011
@@ -1,106 +1,106 @@
-package asunit.framework
-{
- import asunit.errors.AssertionFailedError;
- import asunit.framework.TestCase;
- import asunit.framework.Assert;
- import flash.display.Sprite;
-
- /**
- * Tests assertEqualsArraysIgnoringOrder
- *
- * @author Bastian Krol
- */
- public class AssertEqualsArraysIgnoringOrderTest extends TestCase {
-
- public function AssertEqualsArraysIgnoringOrderTest(testMethod:String = null) {
- super(testMethod);
- }
-
- public function testNullEqualsNull():void {
- assertEqualsArraysIgnoringOrder(Assert.assertEqualsArraysIgnoringOrder, null, null);
- }
-
- public function testNullDoesNotEqualNotNull():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, null, []);
- }
-
- public function testNotNullDoesNotEqualNull():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [], null);
- }
-
- public function testEmptyArrayEqualsEmptyArray():void {
- assertEqualsArraysIgnoringOrder([], []);
- }
-
- public function testArrayWithOneStringEquals():void {
- assertEqualsArraysIgnoringOrder(["abcdefg"], ["abcdefg"]);
- }
-
- public function testArrayWithOneStringNotEquals():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abcdefg"], ["12345"]);
- }
-
- public function testArrayWithOneFunctionEquals():void {
- assertEqualsArraysIgnoringOrder([tearDown], [tearDown]);
- }
-
- public function testArrayWithOneFunctionNotEquals():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [setUp], [tearDown]);
- }
-
- public function testArrayWithOneNullMemberEquals():void {
- assertEqualsArraysIgnoringOrder([null], [null]);
- }
-
- public function testArrayWithOneNullMemberNotEquals1():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["..."], [null]);
- }
-
- public function testArrayWithOneNullMemberNotEquals2():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [null], ["..."]);
- }
-
- public function testArrayEqualsSameOrder():void {
- assertEqualsArraysIgnoringOrder(["abc", "def", "ghi"], ["abc", "def", "ghi"]);
- }
-
- public function testArrayNotEquals():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def", "ghi"], ["abc", "xyz", "ghi"]);
- }
-
- public function testArrayEqualsDifferentOrder1():void {
- assertEqualsArraysIgnoringOrder(["abc", "def", "ghi"], ["def", "abc", "ghi"]);
- }
-
- public function testArrayEqualsDifferentOrder2():void {
- assertEqualsArraysIgnoringOrder([setUp, tearDown, cleanUp], [cleanUp, tearDown, setUp]);
- }
-
- public function testArrayEqualsDifferentTypes():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder,
- ["abc", "def", "ghi"],
- ["abc", setUp, "ghi"]);
- }
-
- public function testArrayDifferentLength1():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def", "ghi"], ["abc", "def"]);
- }
-
- public function testArrayDifferentLength2():void {
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def"], ["abc", "def", "ghi"]);
- }
-
- public function testArrayWithRepeatedItems():void {
- var spr1:Sprite = new Sprite();
- var spr2:Sprite = new Sprite();
- var spr3:Sprite = new Sprite();
-
- var controlArray:Array = [spr1, spr2, spr3, spr1];
- var matchingArray:Array = [spr1, spr2, spr1, spr3];
- var nonMatchingArray:Array = [spr1, spr2, spr3, spr2];
-
- assertEqualsArraysIgnoringOrder('these arrays should match', controlArray, matchingArray);
- assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, controlArray, nonMatchingArray);
- }
- }
+package asunit.framework
+{
+ import asunit.errors.AssertionFailedError;
+ import asunit.framework.TestCase;
+ import asunit.framework.Assert;
+ import flash.display.Sprite;
+
+ /**
+ * Tests assertEqualsArraysIgnoringOrder
+ *
+ * @author Bastian Krol
+ */
+ public class AssertEqualsArraysIgnoringOrderTest extends TestCase {
+
+ public function AssertEqualsArraysIgnoringOrderTest(testMethod:String = null) {
+ super(testMethod);
+ }
+
+ public function testNullEqualsNull():void {
+ assertEqualsArraysIgnoringOrder(Assert.assertEqualsArraysIgnoringOrder, null, null);
+ }
+
+ public function testNullDoesNotEqualNotNull():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, null, []);
+ }
+
+ public function testNotNullDoesNotEqualNull():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [], null);
+ }
+
+ public function testEmptyArrayEqualsEmptyArray():void {
+ assertEqualsArraysIgnoringOrder([], []);
+ }
+
+ public function testArrayWithOneStringEquals():void {
+ assertEqualsArraysIgnoringOrder(["abcdefg"], ["abcdefg"]);
+ }
+
+ public function testArrayWithOneStringNotEquals():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abcdefg"], ["12345"]);
+ }
+
+ public function testArrayWithOneFunctionEquals():void {
+ assertEqualsArraysIgnoringOrder([tearDown], [tearDown]);
+ }
+
+ public function testArrayWithOneFunctionNotEquals():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [setUp], [tearDown]);
+ }
+
+ public function testArrayWithOneNullMemberEquals():void {
+ assertEqualsArraysIgnoringOrder([null], [null]);
+ }
+
+ public function testArrayWithOneNullMemberNotEquals1():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["..."], [null]);
+ }
+
+ public function testArrayWithOneNullMemberNotEquals2():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, [null], ["..."]);
+ }
+
+ public function testArrayEqualsSameOrder():void {
+ assertEqualsArraysIgnoringOrder(["abc", "def", "ghi"], ["abc", "def", "ghi"]);
+ }
+
+ public function testArrayNotEquals():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def", "ghi"], ["abc", "xyz", "ghi"]);
+ }
+
+ public function testArrayEqualsDifferentOrder1():void {
+ assertEqualsArraysIgnoringOrder(["abc", "def", "ghi"], ["def", "abc", "ghi"]);
+ }
+
+ public function testArrayEqualsDifferentOrder2():void {
+ assertEqualsArraysIgnoringOrder([setUp, tearDown, cleanUp], [cleanUp, tearDown, setUp]);
+ }
+
+ public function testArrayEqualsDifferentTypes():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder,
+ ["abc", "def", "ghi"],
+ ["abc", setUp, "ghi"]);
+ }
+
+ public function testArrayDifferentLength1():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def", "ghi"], ["abc", "def"]);
+ }
+
+ public function testArrayDifferentLength2():void {
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, ["abc", "def"], ["abc", "def", "ghi"]);
+ }
+
+ public function testArrayWithRepeatedItems():void {
+ var spr1:Sprite = new Sprite();
+ var spr2:Sprite = new Sprite();
+ var spr3:Sprite = new Sprite();
+
+ var controlArray:Array = [spr1, spr2, spr3, spr1];
+ var matchingArray:Array = [spr1, spr2, spr1, spr3];
+ var nonMatchingArray:Array = [spr1, spr2, spr3, spr2];
+
+ assertEqualsArraysIgnoringOrder('these arrays should match', controlArray, matchingArray);
+ assertAssertionFailed(Assert.assertEqualsArraysIgnoringOrder, controlArray, nonMatchingArray);
+ }
+ }
}
View
@@ -1,86 +1,86 @@
-<project name="AsUnit" default="swc">
-
- <!-- Set up a prefix for all environment variables. -->
- <property environment="env."/>
- <fail unless="env.FLEX_HOME" message="FLEX_HOME needs to be defined as an environment variable or in the Ant build." />
- <!-- Copy Flex SDK location from environment variable. This can be set manually as well. -->
- <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
-
- <!-- project paths -->
- <property name="root.dir" location="."/>
- <property name="src.dir" location="${root.dir}/src"/>
- <property name="vendor.dir" location="${root.dir}/vendor"/>
- <property name="test.dir" location="${root.dir}/test"/>
- <property name="libs.dir" location="${root.dir}/lib"/>
- <property name="output.dir" location="${root.dir}/bin"/>
- <property name="output.swc" location="${output.dir}/asunit.swc"/>
- <property name="tests.swf" location="${root.dir}/AsUnitCIRunner.swf"/>
- <property name="report.dir" location="${root.dir}/report"/>
-
- <taskdef resource="flexUnitTasks.tasks" classpath="${libs.dir}/flexUnitTasks.jar" />
-
- <!-- TARGETS -->
-
- <target name="swc" depends="" description="Compile AS3 code into a SWC">
- <echo>Using Flex SDK at: ${FLEX_HOME}</echo>
-
- <java jar="${FLEX_HOME}/lib/compc.jar" dir="." fork="true" failonerror="true">
- <arg value="+flexlib=${FLEX_HOME}/frameworks" />
- <arg value="-incremental=true" />
-
- <arg value="-source-path+=${src.dir}" />
- <arg value="-source-path+=${vendor.dir}/as3reflection" />
-
- <!-- Include all classes in this path. -->
- <arg value="-include-sources=${src.dir}" />
-
- <!-- Link in classes from swc library (only those used). -->
- <arg value="-library-path+=${libs.dir}" />
-
- <!-- Exclude Flex and AIR framework classes from swc. -->
- <arg value="-external-library-path+=${FLEX_HOME}/frameworks/libs" />
- <!--
- <arg value="-external-library-path+=${libs.dir}/airframework.swc" />
- <arg value="-external-library-path+=${libs.dir}/airglobal.swc" />
- -->
-
- <arg value="-output=${output.swc}" />
- </java>
-
- </target>
-
- <target name="ci" depends="swc" description="Run continuous integration">
- <echo>[test] Running Unit Tests</echo>
- <delete dir="${report.dir}" quiet="true"/>
- <mkdir dir="${report.dir}"/>
-
- <!-- Compile SWF -->
- <java jar="${FLEX_HOME}/lib/mxmlc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
- <arg value="${test.dir}/AsUnitCIRunner.as"/>
- <arg value="-incremental=true"/>
- <arg value="-source-path+=${src.dir}"/>
- <arg value="-output=${tests.swf}"/>
- <arg value="-target-player=10"/>
- <arg value="-default-size=1000,800"/>
- <arg value="-default-background-color=0x000000"/>
- <arg value="-static-link-runtime-shared-libraries=true"/>
- <!-- Include classes from SWCs in this folder, but only the ones we use. -->
- <arg value="-library-path+=${libs.dir}"/>
- <arg value="-verbose-stacktraces=true"/>
- <arg value="-headless-server=true"/>
- <arg value="-keep-as3-metadata+=Test,Suite,Before,BeforeClass,After,AfterClass,RunWith,Ignore,Inject"/>
- </java>
-
- <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
- <flexunit swf="${tests.swf}" toDir="${report.dir}" haltonfailure="false" verbose="true" localTrusted="false" />
-
- <!-- Generate readable JUnit-style reports -->
- <junitreport todir="${report.dir}">
- <fileset dir="${report.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="${report.dir}/html" />
- </junitreport>
- </target>
-
-</project>
+<project name="AsUnit" default="swc">
+
+ <!-- Set up a prefix for all environment variables. -->
+ <property environment="env."/>
+ <fail unless="env.FLEX_HOME" message="FLEX_HOME needs to be defined as an environment variable or in the Ant build." />
+ <!-- Copy Flex SDK location from environment variable. This can be set manually as well. -->
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
+
+ <!-- project paths -->
+ <property name="root.dir" location="."/>
+ <property name="src.dir" location="${root.dir}/src"/>
+ <property name="vendor.dir" location="${root.dir}/vendor"/>
+ <property name="test.dir" location="${root.dir}/test"/>
+ <property name="libs.dir" location="${root.dir}/lib"/>
+ <property name="output.dir" location="${root.dir}/bin"/>
+ <property name="output.swc" location="${output.dir}/asunit.swc"/>
+ <property name="tests.swf" location="${root.dir}/AsUnitCIRunner.swf"/>
+ <property name="report.dir" location="${root.dir}/report"/>
+
+ <taskdef resource="flexUnitTasks.tasks" classpath="${libs.dir}/flexUnitTasks.jar" />
+
+ <!-- TARGETS -->
+
+ <target name="swc" depends="" description="Compile AS3 code into a SWC">
+ <echo>Using Flex SDK at: ${FLEX_HOME}</echo>
+
+ <java jar="${FLEX_HOME}/lib/compc.jar" dir="." fork="true" failonerror="true">
+ <arg value="+flexlib=${FLEX_HOME}/frameworks" />
+ <arg value="-incremental=true" />
+
+ <arg value="-source-path+=${src.dir}" />
+ <arg value="-source-path+=${vendor.dir}/as3reflection" />
+
+ <!-- Include all classes in this path. -->
+ <arg value="-include-sources=${src.dir}" />
+
+ <!-- Link in classes from swc library (only those used). -->
+ <arg value="-library-path+=${libs.dir}" />
+
+ <!-- Exclude Flex and AIR framework classes from swc. -->
+ <arg value="-external-library-path+=${FLEX_HOME}/frameworks/libs" />
+ <!--
+ <arg value="-external-library-path+=${libs.dir}/airframework.swc" />
+ <arg value="-external-library-path+=${libs.dir}/airglobal.swc" />
+ -->
+
+ <arg value="-output=${output.swc}" />
+ </java>
+
+ </target>
+
+ <target name="ci" depends="swc" description="Run continuous integration">
+ <echo>[test] Running Unit Tests</echo>
+ <delete dir="${report.dir}" quiet="true"/>
+ <mkdir dir="${report.dir}"/>
+
+ <!-- Compile SWF -->
+ <java jar="${FLEX_HOME}/lib/mxmlc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
+ <arg value="${test.dir}/AsUnitCIRunner.as"/>
+ <arg value="-incremental=true"/>
+ <arg value="-source-path+=${src.dir}"/>
+ <arg value="-output=${tests.swf}"/>
+ <arg value="-target-player=10"/>
+ <arg value="-default-size=1000,800"/>
+ <arg value="-default-background-color=0x000000"/>
+ <arg value="-static-link-runtime-shared-libraries=true"/>
+ <!-- Include classes from SWCs in this folder, but only the ones we use. -->
+ <arg value="-library-path+=${libs.dir}"/>
+ <arg value="-verbose-stacktraces=true"/>
+ <arg value="-headless-server=true"/>
+ <arg value="-keep-as3-metadata+=Test,Suite,Before,BeforeClass,After,AfterClass,RunWith,Ignore,Inject"/>
+ </java>
+
+ <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
+ <flexunit swf="${tests.swf}" toDir="${report.dir}" haltonfailure="false" verbose="true" localTrusted="false" />
+
+ <!-- Generate readable JUnit-style reports -->
+ <junitreport todir="${report.dir}">
+ <fileset dir="${report.dir}">
+ <include name="TEST-*.xml" />
+ </fileset>
+ <report format="frames" todir="${report.dir}/html" />
+ </junitreport>
+ </target>
+
+</project>
@@ -1,5 +1,5 @@
-package asunit.asserts {
- import asunit.framework.Assert;
-
- public var assertNull:Function = Assert.assertNull;
-}
+package asunit.asserts {
+ import asunit.framework.Assert;
+
+ public var assertNull:Function = Assert.assertNull;
+}
Oops, something went wrong.

0 comments on commit 6615297

Please sign in to comment.