<commit_before>package asunit.runners {

    import asunit.framework.TestCase;

    import asunit.framework.IResult;
    import asunit.framework.Result;
    import asunit.framework.LegacyTestIterator;
    import asunit.support.LegacyTestCase;

    public class LegacyRunnerTest extends TestCase {

        private var testResult:IResult;
        private var testRunner:LegacyRunner;

        public function LegacyRunnerTest(methodName:String=null) {
            super(methodName)
        }

        override protected function setUp():void {
            super.setUp();
            LegacyTestCase.callCount = 0;
            testResult = new Result();
            testRunner = new LegacyRunner();
        }

        override protected function tearDown():void {
            super.tearDown();
            testResult = null;
            testRunner = null;
        }

        public function testSimpleSubclass():void {
            testRunner.run(LegacyTestCase, testResult);
            assertEquals(0, testResult.failureCount);
            assertEquals(2, testResult.runCount);
        }<commit_msg>Fixed test method so that it still works if green threads are enabled<commit_after>package asunit.runners {

    import asunit.framework.IResult;
    import asunit.framework.LegacyTestIterator;
    import asunit.framework.Result;
    import asunit.framework.TestCase;
    import asunit.support.LegacyTestCase;

    import flash.events.Event;

    public class LegacyRunnerTest extends TestCase {

        private var testResult:IResult;
        private var testRunner:LegacyRunner;

        public function LegacyRunnerTest(methodName:String=null) {
            super(methodName)
        }

        override protected function setUp():void {
            super.setUp();
            LegacyTestCase.callCount = 0;
            testResult = new Result();
            testRunner = new LegacyRunner();
        }

        override protected function tearDown():void {
            super.tearDown();
            testResult = null;
            testRunner = null;
        }

        public function testSimpleSubclass():void {
            var handler:Function = function(event:Event):void {
                assertEquals(0, testResult.failureCount);
                assertEquals(2, testResult.runCount);
            };
            testRunner.addEventListener(Event.COMPLETE, addAsync(handler));
            testRunner.run(LegacyTestCase, testResult);
        }
{'fraction_non_alphanumeric': 0.07855973813420622, 'fraction_numerical': 0.0024549918166939444, 'mean_word_length': 2.299595141700405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4886064', 'n_tokens_mistral': 611, 'n_tokens_neox': 584, 'n_words': 135}