Hi all, Ok ... so as the Ant build seems to have assertions disabled, I disabled them for the Maven build as well:
Tests run: 375, Failures: 0, Errors: 0, Skipped: 26 But we should fix this as soon as possible. Also I added my changes with the TestAdapters to the develop branch. It shouldn't change anything there, but this way I don't have problems with moved directories when merging the latest changes from develop into my branch. I will now try to add the missing integration-tests and get them working for the compiler artifact. As soon as that's done I'll do the same with the tests in compiler.jx So currently it looks as if I was way beyond schedule ... I estimated a lot more time to get this working :-) Chris ________________________________________ Von: Christofer Dutz <christofer.d...@c-ware.de> Gesendet: Mittwoch, 24. Februar 2016 09:08 An: dev@flex.apache.org Betreff: AW: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems Hi Alex, that sounds as if you are using assertions in a way that contradictory to what they are intended to be used. Assertions are meant to be hard checks to the contract of a method. Assumptions the code needs to operate correctly. Usually you could do the same with if-statements, but in contrast to using normal checks, assertion code is skipped if assertions are disabled. They are usually skipped in production systems. The main intention of assertions is to fail fast and hard if something is not as expected. This is true during development and especially during the execution of unit-tests. So I think there are to options here: 1. The assertions are not correct and the code could actually work with the failing condition 2. The test is not correct. In the case I investigated, there is a namespace declaration without any namespace. The check failing, fails because "the quotes have been removed while parsing the expression" ... well there is no expression, so it doesn't contain quotes. I would rather check if there is an expression first. If a namespace declaration has no definition, then the expression should be invalid and not complain that it doesn't have quotes. So I strongly object to switching assertions off in unit tests. If we do, we should remove them all together. Chris ________________________________________ Von: Alex Harui <aha...@adobe.com> Gesendet: Dienstag, 23. Februar 2016 22:07 An: dev@flex.apache.org Betreff: Re: AW: AW: AW: [FALCONJX]Compiling Falcon with externs problems Hi Chris, I am not that familiar with how asserts work in Java, but it has seemed to me that asserts are often or always disabled in Falcon code. The debugger seems to stop on an assert, but it doesn't always fire. For example, I think you are seeing the test fail on this assert: assert getExpressionNode() instanceof IExpressionNode : "getValue() shouldn't be getting called on a non-expression MXMLFunctionNode"; And for me getExpressionNode() returns null, which IMO, is the correct thing to return. So I think null isn't an instance of IExpressionNode, but for me, the test continues to the next step in the debugger which is why I think asserts are disabled. And should be for tests doing degenerate case testing like how null values behave. Does that make sense? -Alex On 2/23/16, 9:26 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote: >Hi Alex, > >Well I think that's something completely different. I never knew you >could setup Eclipse to run every test each time you save, but that sort >of doesn't seem to make much sense to me. Isn't Eclipse already slow >enough? ;-) > >Usually you put the unit-tests together in the same project as the code >they test. If you have cross-cutting integration test's it's ok to put >them in a separate package, but unit- and component-tests I think belong >to the code they test. I haven't come across a single project, except >Flex, where this hasn't been that way, but I am pretty sure you can >configure Eclipse to continue to run the tests. For maven there is a >"lifecycle-mapping" feature in the M2Eclipse plugin, that might help. > >Coming back to the unit tests ... I have 8 failing tests that sort of >don't look as if this is related to the maven migration: > > >CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace1:64->get >CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip >namespace quotes in parser. > >CSSNamespaceDefinitionTests.CSSNamespaceDefinitionTests_namespace2:80->get >CSSNamespaceDefinition:40->CSSBaseTests.getCSSNodeBase:69 Do not strip >namespace quotes in parser. > MXMLClassNodeTests.MXMLClassNode_empty2:68 getValue() shouldn't be >getting called on a non-expression MXMLClassNode > MXMLClassNodeTests.MXMLClassNode_empty3:80 getValue() shouldn't be >getting called on a non-expression MXMLClassNode > MXMLClassNodeTests.MXMLClassNode_empty1:56 getValue() shouldn't be >getting called on a non-expression MXMLClassNode > MXMLFunctionNodeTests.MXMLFunctionNode_empty2:69 getValue() shouldn't >be getting called on a non-expression MXMLFunctionNode > MXMLFunctionNodeTests.MXMLFunctionNode_empty3:81 getValue() shouldn't >be getting called on a non-expression MXMLFunctionNode > MXMLFunctionNodeTests.MXMLFunctionNode_empty1:57 getValue() shouldn't >be getting called on a non-expression MXMLFunctionNode > >Do you have an idea, why they are red? > >Chris > > > >________________________________________ >Von: Alex Harui <aha...@adobe.com> >Gesendet: Dienstag, 23. Februar 2016 17:53 >An: dev@flex.apache.org >Betreff: Re: AW: AW: [FALCONJX]Compiling Falcon with externs problems > >On 2/23/16, 7:56 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote: > >>Looking better and better each day :-) >> >>With my adjusted base-class I get this: >> >>Tests run: 375, Failures: 8, Errors: 0, Skipped: 26 > >Good progress. > >I have a question about the Eclipse projects. Will we have to get rid of >them and make Eclipse Maven projects? In the current set of projects, the >unit tests are in their own Eclipse project, but I saw that you moved the >tests under the source project. If the tests and source end up in a >single Eclipse project, I assume the tests won't run after each save in >the editor, right? > >Thanks, >-Alex >