application concrete dans un projet hors maashaack/ASTUce mais qui utilise ASTUce pour ses unit tests
gaforflash :) petite modif dans la build http://code.google.com/p/gaforflash/source/browse/trunk/build.xml#150 ------------------------------ <target name="unit_tests" description="build and run the Library unit tests"> <echo message="building library unit tests" level="verbose" /> <mxmlc file="${gaffa.src}/GA_TestRunnerCompact.as" output="${astuce.path}/ga-tests.swf" > <strict>true</strict> <debug>true</debug> <default-size width="128" height="128" /> <source-path path-element="${release.tmp}" /> <source-path path-element="${gaffa.tests}/GAv4" /> <external-library-path dir="${flex.libs}/player" includes="playerglobal.swc" /> <external-library-path dir="${gaffa.libs}" includes="maashaack.swc" /> <external-library-path dir="${gaffa.libs}" includes="ASTUce.swc" /> </mxmlc> <echo message="running library unit tests" level="verbose" /> <exec executable="${ASTUCE}" failonerror="true"> <!--<arg line="-s" />--> <arg line="-l:ga-tests.swf" /> <arg line="com.google.analytics.AllTests" /> </exec> <delete file="${astuce.path}/ga-tests.swf"/> </target> ------------------------------ le petit truc a retenir est d'utiliser les SWC pour mettre maashaack et ASTUce en lib external (cad on compile avec mais on n'inclut pas le bytecode dans le SWF final) et meme si le redshell ne contient que des mock des classes du Flahs Player par ex: http://code.google.com/p/redtamarin/source/browse/trunk/src/extensions/flash_net.as et en particulier flash.net.URLVariables et bah la classe http://code.google.com/p/gaforflash/source/browse/trunk/src/com/google/analytics/utils/Variables.as et le test http://code.google.com/p/gaforflash/source/browse/trunk/tests/GAv4/com/google/analytics/utils/VariablesTest.as qui tous deux font reference à flash.net.URLVariables et bien ca passe sans probleme oui meme si il n'y a pas une vraie implementation dans redtamarin et seulement un mock (c'est le gros trick du ASTUce.exe en fait :p) et voici la sortie dans Ant: ------------------------------ $ ant Buildfile: build.xml [svn] <Info> started ... [svn] <Info> finished. [echo] Google Analytics Tracking For Adobe Flash v1.0.1.391 clean: [delete] Deleting directory /projects/GAforFlash/GA_AS3/bin [delete] Deleting directory /projects/GAforFlash/GA_AS3/build/tmp init: [mkdir] Created dir: /projects/GAforFlash/GA_AS3/bin [svn] <Export> started ... [svn] <Export> finished. unit_tests: [mxmlc] Loading configuration file /OpenSource/Flex/sdks/3.0.0/frameworks/flex-config.xml [mxmlc] /projects/GAforFlash/GA_AS3/build/ASTUce/ga-tests.swf (66053 bytes) [exec] ASTUce v0.1 [exec] ---------------------------------------------------------------- [exec] [com.google.analytics.AllTests] #0 [exec] ...................................... [exec] ...................................... [exec] ...................................... [exec] .................................... [exec] Time: 0h:0mn:0s:173ms [exec] [exec] OK (150 tests) [exec] ---------------------------------------------------------------- [delete] Deleting: /projects/GAforFlash/GA_AS3/build/ASTUce/ga- tests.swf clean-documentation: [delete] Deleting directory /projects/GAforFlash/GA_AS3/docs/ analytics documentation: [mkdir] Created dir: /projects/GAforFlash/GA_AS3/docs/analytics [exec] Loading configuration file /OpenSource/Flex/sdks/3.0.0/frameworks/flex-config.xml [exec] [exec] [exec] [exec] [exec] [exec] Documentation was created in /projects/GAforFlash/GA_AS3/ docs/analytics/ [copy] Copying 149 files to /projects/GAforFlash/GA_AS3/bin/doc library_component: [compc] Loading configuration file /OpenSource/Flex/sdks/3.0.0/frameworks/flex-config.xml [compc] /projects/GAforFlash/GA_AS3/bin/lib/analytics.swc (107250 bytes) templates: [copy] Copying 1 file to /projects/GAforFlash/GA_AS3/bin include-source: commonfiles: [copy] Copying 1 file to /projects/GAforFlash/GA_AS3/bin [copy] Copying 1 file to /projects/GAforFlash/GA_AS3/bin [copy] Copying 1 file to /projects/GAforFlash/GA_AS3/bin/lib package: main: BUILD SUCCESSFUL Total time: 43 seconds ------------------------------ bref ca marche tres tres tres bien nan vraiment je suis content de mon coup :D zwetan --~--~---------~--~----~------------~-------~--~----~ Vous avez reçu ce message, car vous êtes abonné au groupe Groupe "FCNG" de Google Groupes. Pour transmettre des messages à ce groupe, envoyez un e-mail à l'adresse [email protected] Pour résilier votre abonnement à ce groupe, envoyez un e-mail à l'adresse [email protected] Pour afficher d'autres options, visitez ce groupe à l'adresse http://groups.google.com/group/FCNG?hl=fr -~----------~----~----~----~------~----~------~--~---
