Turns out the problem is triggered by my components updateDisplayList
(). I don't know if fluint is supposed to catch errors during a
components validation phase, but this would be the testcase:
// Component
package ns
{
import mx.core.UIComponent;
public class TestComponent extends UIComponent
{
public var _goBoom:Boolean = false;
public function trigger():void
{
_goBoom = true;
invalidateDisplayList();
}
override protected function updateDisplayList(w:Number,
h:Number):void
{
super.updateDisplayList(w, h);
if (_goBoom)
{
_goBoom = false;
var nullObj:Object = null;
nullObj.number = 42; // This is caught by flex builder, not by
fluint
}
}
}
}
// Testcase
package ns
{
import mx.events.FlexEvent;
import net.digitalprimates.fluint.sequence.SequenceCaller;
import net.digitalprimates.fluint.sequence.SequenceRunner;
import net.digitalprimates.fluint.sequence.SequenceWaiter;
import net.digitalprimates.fluint.tests.TestCase;
public class SeqTestCase extends TestCase
{
public var comp:TestComponent;
public var seq:SequenceRunner;
override protected function setUp():void
{
super.setUp();
comp = new TestComponent();
seq = new SequenceRunner(this);
seq.addStep(new SequenceWaiter(comp, FlexEvent.CREATION_COMPLETE,
1000));
seq.addStep(new SequenceCaller(comp, comp.trigger));
}
public function testBoom():void
{
addChild(comp);
seq.run();
}
public function testFail():void
{
fail() // not executed, since the test runner stops after executing
testBoom