|
From: Luke B. <lb...@gm...> - 2005-07-03 22:09:11
|
---------- Forwarded message ---------- From: Don Petersen <dpe...@cr...> Date: Jul 3, 2005 11:41 AM Subject: [osflash] ASUnit, MTASC, and Me To: Open Source Flash Mailing List <os...@os...> I've tried to work this out on my own, I've been throught the archives for this list, the MTASC list, and the ASUnit list. I can't find anyone else having this problem, leading me to believe I'm screwing *something* up. But I can't figure it out. I figure that the problem is with me, and this list is probably a better forum than the ASUnit list to find other users who have ASUnit running with FAMES. I'm trying to run the great tutorial that Aral created in his blog here: http://flashant.org/index.php?p=3D375&c=3D1 I've literally just downloaded his example files, and downloaded the newest version of ASUnit. I'm receiving the following compile error from MTASC when I try to compile the example: _______________________________________________________ /home/dpetersen/workspace/test_ut/src/com/asunit/framework/Test.as:2: characters 0-6 : Warning import not used /home/dpetersen/workspace/test_ut/src/com/asunit/framework/Assert.as:98: characters 5-22 : type error Object have no field equals _______________________________________________________ I'm including the warning in there, even though I'd imagine it's unrelated. As you can see, the errors that it's throwing are with the ASUnit source files that I downloaded. I just want to verify: This is working for some folks, correct? Under the assumption that it was something with my setup, I've tried numerous things. I was using MTASC 1.06, so I compiled 1.08 for Linux and used it, same result. I grabbed a fresh copy of the Macromedia Classes and included them, no change. I tried the modified version of ASUnit that is referenced at the top of the article, same problem. I've deleted it all and started from scratch twice, just to make sure I didn't miss any steps. No dice. My only other though was that I possibly downloaded an older version of ASUnit by mistake, since the file doesn't hint at it's version, it's just "AsUnit-src.zip". But checking the RELEASE_NOTES.TXT, it's version 2.6.4. My "installation" process for ASUnit was simply downloading the Source Code(http://prdownloads.sourceforge.net/asunit/AsUnit-src.zip?download) and unzipping it. I put the com folder in my classpath, along with the Sys.as file. I also copied the "ASUnit UI.swf" to my webroot so that I could access it from the "PHP Browser" panel, as described in the tutorial. No problems with that step, I was able to see 1 of 2 asserts pass when I ran Aral's already-compiled SWF. Did I miss anything else? Looking at the other files distributed with it, I didn't feel that they were applicable for use in FAMES. I'm stumped, and I have a bad feeling I'm missing something basic. Don Petersen _______________________________________________ osflash mailing list os...@os... http://osflash.org/mailman/listinfo/osflash_osflash.org |
|
From: Luke B. <lb...@gm...> - 2005-07-03 22:09:40
|
---------- Forwarded message ----------
From: Luke Bayes <lb...@gm...>
Date: Jul 3, 2005 3:08 PM
Subject: Re: [osflash] ASUnit, MTASC, and Me
To: Open Source Flash Mailing List <os...@os...>
Cc: dpe...@cr...
Hey Guys,
I just caught this post and it looks like there are a couple bugs in
AsUnit related to the latest MTASC compiler.
I just fixed and checked in the Test.as warning in the cvs sources, if
it bothers you (as much as it would bother me!), feel free to remove
the import statement from that file in your local build, it will be
fixed in the next release.
As far as the error goes...
/home/dpetersen/workspace/test_ut/src/com/asunit/framework/Assert.as:98:
characters 5-22 : type error Object have no field equals
It loos like MTASC is not treating the Object object as a "dynamic"
class in this case.
I don't have FAME all set up on this system right now, so I can't
really test a fix. Could someone take a look at line 98 of the
com.asunit.framework.Assert class?
It looks to me like this statement:
if(assertion1.equals !=3D undefined) {
addTestResult(String(msg), "assertEquals",
assertion1.equals(assertion2));
} else if(assertion2.equals !=3D undefined) {
addTestResult(String(msg), "assertEquals",
assertion2.equals(assertion1));
} else {
addTestResult(String(msg), "assertEquals", assertion1 =3D=3D=3D ass=
ertion2);
}
Might need to change to:
if(assertion1["equals"] !=3D undefined) {
addTestResult(String(msg), "assertEquals",
assertion1["equals"](assertion2));
} else if(assertion2["equals"] !=3D undefined) {
addTestResult(String(msg), "assertEquals",
assertion2["equals"](assertion1));
} else {
addTestResult(String(msg), "assertEquals", assertion1 =3D=3D=3D ass=
ertion2);
}
Do the brackets work in MTASC?
Could you try pasting this into your local build and let me know if it work=
s?
Thanks for the heads up and sorry for the immense frustration!
Thanks,
Luke Bayes
www.asunit.com
|
|
From: Luke B. <lb...@gm...> - 2005-07-04 01:18:11
|
Hey Don, Thanks for the reply. I definitely appreciate your patience in getting through this. If you wouldn't mind, could you please let me know exactly which files were still complaining about the unused import statements? It would really help us get AsUnit to be less painful for everyone! Thanks, Luke Bayes www.asunit.com On 7/3/05, Don Petersen <dpe...@cr...> wrote: > Luke, >=20 > I was writing my follow-up email as you sent this. You're definitely > right about Object not being treated as dynamic. But to summarize my > other email, as far as I can tell it is only an issue when compiling > through Flashout, and only on Linux. I'd love to see if anybody else > has the same issue with a similar setup, or if I'm just "lucky"! >=20 > I did go ahead and modify ASUnit as you directed below(and in a few > other places, as that issue pops up elsewhere). A couple minutes of > modification and now I'm compiling OK in Flashout. Given the crazy set > up circumstances that have to appear for this to happen, I definitely > wouldn't call it an issue with ASUnit. I'll leave my copy modified for > the weekend and see if Eugene or anybody else has the same issue, or any > ideas why it might be occuring. >=20 > As far as immense frustration, it was hardly that bad. I'm just excited > to be able to use this cool piece of software now! Unit Testing, here I > come... >=20 > Don Petersen >=20 >=20 > > I just caught this post and it looks like there are a couple bugs in > > AsUnit related to the latest MTASC compiler. > > > > I just fixed and checked in the Test.as warning in the cvs sources, if > > it bothers you (as much as it would bother me!), feel free to remove > > the import statement from that file in your local build, it will be > > fixed in the next release. > > > > As far as the error goes... > > > > /home/dpetersen/workspace/test_ut/src/com/asunit/framework/Assert.as:98= : > > characters 5-22 : type error Object have no field equals > > > > It loos like MTASC is not treating the Object object as a "dynamic" > > class in this case. > > > > I don't have FAME all set up on this system right now, so I can't > > really test a fix. Could someone take a look at line 98 of the > > com.asunit.framework.Assert class? > > > > It looks to me like this statement: > > > > if(assertion1.equals !=3D undefined) { > > addTestResult(String(msg), "assertEquals", > > assertion1.equals(assertion2)); > > } else if(assertion2.equals !=3D undefined) { > > addTestResult(String(msg), "assertEquals", > > assertion2.equals(assertion1)); > > } else { > > addTestResult(String(msg), "assertEquals", assertion1 =3D=3D=3D > > assertion2); > > } > > > > Might need to change to: > > > > if(assertion1["equals"] !=3D undefined) { > > addTestResult(String(msg), "assertEquals", > > assertion1["equals"](assertion2)); > > } else if(assertion2["equals"] !=3D undefined) { > > addTestResult(String(msg), "assertEquals", > > assertion2["equals"](assertion1)); > > } else { > > addTestResult(String(msg), "assertEquals", assertion1 =3D=3D=3D > > assertion2); > > } > > > > Do the brackets work in MTASC? > > > > Could you try pasting this into your local build and let me know if it > > works? > > > > Thanks for the heads up and sorry for the immense frustration! >=20 > _______________________________________________ > osflash mailing list > os...@os... > http://osflash.org/mailman/listinfo/osflash_osflash.org > |