making custom version of 03g1-debugging with unit test stuff (I think?)

cat-town
Dan Buch 15 years ago
parent 2333135720
commit 948d15ad6b

@ -7,11 +7,13 @@
# make MXMLC=/path/to/my/mxmlc # make MXMLC=/path/to/my/mxmlc
MXMLC ?= mxmlc MXMLC ?= mxmlc
COMPC ?= compc COMPC ?= compc
ifdef DEBUG ifdef DEBUG
MXMLC_FLAGS ?= -warnings -strict -debug -keep-generated-actionscript MXMLC_FLAGS ?= -warnings -strict -debug -keep-generated-actionscript
else else
MXMLC_FLAGS ?= -warnings -strict MXMLC_FLAGS ?= -warnings -strict
endif endif
MXMLC_FLAGS += -l+=$(HOME)/.local/share/flexunit
# define all dependency mxml paths and their swf path targets # define all dependency mxml paths and their swf path targets

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<me:DebuggingApp
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
xmlns:me="me.*" />

@ -0,0 +1,36 @@
package me
{
import mx.core.Application;
import mx.controls.Alert;
import mx.controls.Button;
import flash.events.Event;
import flash.events.MouseEvent;
public class DebuggingApp extends Application
{
public var clickButton:Button;
public function DebuggingApp():void
{
this.addEventListener("creationComplete", initApp);
clickButton = new Button();
clickButton.label = "Click Me";
clickButton.addEventListener("click", showAlert);
this.addChild(clickButton);
}
public function showAlert(event:MouseEvent):void
{
Alert.show('Hello from Flex');
trace("Clickety Click! -> " + event);
}
public function initApp(event:Event):void
{
trace("Hello from Flex Debugging!");
var myVar:Number = 9;
trace("The value of myVar is " + myVar);
}
}
}

@ -0,0 +1,27 @@
package me.tests
{
import me.Debugging;
import mx.core.Application;
import org.flexunit.listeners.UIListener;
import org.flexunit.runner.TestRunnerBase;
import org.flexunit.runner.FlexUnitCore;
public class TestDebugging extends Application
{
public var uiListener:TestRunnerBase;
private var core:FlexUnitCore;
public function TestDebugging():void
{
this.addEventListener("creationComplete", runMe);
}
public function runMe():void
{
core = new FlexUnitCore();
core.addListener(new UIListener(uiListener));
core.run(Debugging);
}
}
}

@ -199,3 +199,7 @@ custom-03d4-tilelist/TileListExample.swf: custom-03d4-tilelist/TileListExample.m
$(MXMLC) custom-03d4-tilelist/TileListExample.mxml $(MXMLC_FLAGS) -l+=custom-03d4-tilelist -o custom-03d4-tilelist/TileListExample.swf $(MXMLC) custom-03d4-tilelist/TileListExample.mxml $(MXMLC_FLAGS) -l+=custom-03d4-tilelist -o custom-03d4-tilelist/TileListExample.swf
custom-03g1-debugging/Debugging.swf: custom-03g1-debugging/Debugging.mxml custom-03g1-debugging/me/DebuggingApp.as custom-03g1-debugging/me/tests/TestDebugging.as
$(MXMLC) custom-03g1-debugging/Debugging.mxml $(MXMLC_FLAGS) -l+=custom-03g1-debugging -o custom-03g1-debugging/Debugging.swf

Loading…
Cancel
Save