You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2012/12/28 10:35:08 UTC

[FalconJx::TestGoogXYZ] Creating tests for emmitters

Mike,

While trying to stay out of your hair in the FalconJx code, I thought
I might spend some time translating the tests you wrote for the AS
output to tests for the JS + 'goog' output. I'm doing this by copying
the AS tests, renaming them, converting them to subclasses of the AS
tests and pointing them to the 'GoogBackend' (using the code from your
test class).

An observation: some methods of JSGoogEmitter rely on 'globals' like
'classDefinition', which are not set when the methods are called from
the tests. I'm not very familiar with JUnit (or unit testing in
general), so a little pointer on how to fix this would be much
appreciated.

Meanwhile I'll put all the tests (with the 'assertOut' commented out)
in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
we want to put the 'goog' Emitter classes of the compiler also in a
'goog' package, to increase the separation between them and other
output types?

EdB



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Erik,

Don't get me wrong man, you are awesome in what you are doing!!!

The problem is we are talking through email and code and if I talked  
to you in person for about an hour, I could tell you the little design  
decisions I made and why.

Please do not take anything I say as something like I couldn't make  
the exact same mistake. I will, trust me.

Actually I whole heartily encourage you to do exactly what you did  
because nothing is learned from trying to be perfect. As a matter of  
fact, when I am programming and designing things I try to make  
mistakes and break things because you end up understanding more.

If I was standing next to you I would give you a pat on the back for  
being a partner with me right now. :)

Mike



Quoting Erik de Bruin <er...@ixsoftware.nl>:

> Ah, I'm more sloppy than I thought, sorry again. I did test, but I had
> that 'debug' method hanging around, so they all passed.
>
> I like really atomic commits, but that's not at all that easy (I'm not
> complaining, mind you), as the changes needed to make some tests pass
> are all over the place ;-)
>
> I guess things will improve when we get more experience with the
> codebase and with working together, please be patient.
>
> I think I'll take that week off now, too :-)
>
> EdB
>
>
>
> On Sun, Dec 30, 2012 at 9:08 PM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>> Erik,
>>
>> Did you run all the tests before you committed? I have 9 failures and had an
>> error assertOutDebug not found.
>>
>> I also see now what happened to the semi-colan debacle.
>>
>> I should have told you this but when testing a function/method, it will not
>> have the semi-colon because it's the larger container, in this case the
>> TypeNode emit that will add the semi-colon. So you will test for semi-colons
>> when you test a class with methods.
>>
>> I'm going to fix these tests so they all pass and commit them.
>>
>> In my experience working with large frameworks and testing them, its not a
>> good idea to have a bunch of hanging code not committed. Since we are
>> working together it will make it easier if you do more discrete commits
>> right now.
>>
>> We also have to get rid of those NASTY globals, I'm going to add
>> configuration variables soon for this so they get reset automatically
>> (JSConfiguration) in the setup of the Backend.
>>
>> Remember run the whole suite before you commit, if you did and they all
>> passed I think you are changing to much at a time. :)
>>
>>
>> Mike
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> I've finished implementing the code to make the "Method Members" tests
>>> pass. I needed to reroute some of the AS emitter code in order to
>>> allow the JS emitter to override the writing of the function closing
>>> block so I could output the closing semicolon, please feel free to
>>> check my implementation and brutally comment on my hacks :-)
>>>
>>> EdB
>>>
>>>
>>> On Sat, Dec 29, 2012 at 1:35 AM, Michael Schmalle
>>> <ap...@teotigraphix.com> wrote:
>>>>
>>>>
>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>
>>>>> Mike,
>>>>>
>>>>> New 'layout' looks great!
>>>>
>>>>
>>>>
>>>> I figured as much. I sat in front of the package explorer for about 30
>>>> minutes thinking about package names in sentences. I knew I would be
>>>> looking
>>>> and searching through these for hours to come, if you see anything that
>>>> should be changed, we should do it sooner than later.
>>>>
>>>>
>>>>> I'm adding test classes one by one, when i have "all" the code for the
>>>>> 'asserts' figured out. The tests will fail (obviously), but with the
>>>>> tests in place if will be much easier for me to work on the actual
>>>>> code. I'll be away for much of next week, but maybe I get some time
>>>>> this weekend to work on this a bit more.
>>>>
>>>>
>>>>
>>>> Right, I'm sure you have a life as well. I might sneak in and make a
>>>> couple
>>>> tests work so it might help your context when doing your tasks.
>>>>
>>>> I think I am going to focus back on AS3 and the walker impl to get it
>>>> more
>>>> abstract. I'll hand the JS to you for the next couple weeks. :)
>>>>
>>>>
>>>>> EdB
>>>>>
>>>>>
>>>>> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> I'm on the commit list, and I try to make it a habit to Update before
>>>>>> I start any work, so no need for a separate notification, but thanks.
>>>>>>
>>>>>> EdB
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> HAH!
>>>>>>>
>>>>>>> You got me, wow I was so organized starting this project. :)
>>>>>>>
>>>>>>> I'm looking about 1-2 hours if everything goes right. I hate these but
>>>>>>> this
>>>>>>> is what you get for being a mad scientist sometimes. After this we
>>>>>>> should be
>>>>>>> good to go, I think all the reorganization will make sense.
>>>>>>>
>>>>>>> I'll let you know when I commit if you aren't watching the commits
>>>>>>> list.
>>>>>>> It's funny, I now remember in the very beginning putting the tests in
>>>>>>> js
>>>>>>> and
>>>>>>> thinking this doesn't make sense...
>>>>>>>
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>>
>>>>>>>> MIke,
>>>>>>>>
>>>>>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>>>>>> I'll hold off on committing more tests and make them work on the
>>>>>>>> 'new'
>>>>>>>> code first, no worries.
>>>>>>>>
>>>>>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>>>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>>>>>
>>>>>>>> EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Erik,
>>>>>>>>>
>>>>>>>>> FYI I am doing this refactor right now and it's big, so when you do
>>>>>>>>> an
>>>>>>>>> svn
>>>>>>>>> update, you will have to rub your eyes for a second. I wanted to to
>>>>>>>>> do
>>>>>>>>> this,
>>>>>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog'
>>>>>>>>> gave
>>>>>>>>> me
>>>>>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think
>>>>>>>>> you
>>>>>>>>> meant
>>>>>>>>> 'org.apache.flex.compiler'. :)
>>>>>>>>>
>>>>>>>>> Before I commit this huge update, I will make sure your tests are
>>>>>>>>> running
>>>>>>>>> correctly.
>>>>>>>>>
>>>>>>>>> Mike
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>>>>
>>>>>>>>>> Mike,
>>>>>>>>>>
>>>>>>>>>> While trying to stay out of your hair in the FalconJx code, I
>>>>>>>>>> thought
>>>>>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>>>>>> output to tests for the JS + 'goog' output. I'm doing this by
>>>>>>>>>> copying
>>>>>>>>>> the AS tests, renaming them, converting them to subclasses of the
>>>>>>>>>> AS
>>>>>>>>>> tests and pointing them to the 'GoogBackend' (using the code from
>>>>>>>>>> your
>>>>>>>>>> test class).
>>>>>>>>>>
>>>>>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals'
>>>>>>>>>> like
>>>>>>>>>> 'classDefinition', which are not set when the methods are called
>>>>>>>>>> from
>>>>>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>>>>>> general), so a little pointer on how to fix this would be much
>>>>>>>>>> appreciated.
>>>>>>>>>>
>>>>>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented
>>>>>>>>>> out)
>>>>>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'.
>>>>>>>>>> Maybe
>>>>>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>>>>>> 'goog' package, to increase the separation between them and other
>>>>>>>>>> output types?
>>>>>>>>>>
>>>>>>>>>> EdB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Ix Multimedia Software
>>>>>>>>>>
>>>>>>>>>> Jan Luykenstraat 27
>>>>>>>>>> 3521 VB Utrecht
>>>>>>>>>>
>>>>>>>>>> T. 06-51952295
>>>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>>>>> http://www.teotigraphix.com
>>>>>>>>> http://blog.teotigraphix.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ix Multimedia Software
>>>>>>>>
>>>>>>>> Jan Luykenstraat 27
>>>>>>>> 3521 VB Utrecht
>>>>>>>>
>>>>>>>> T. 06-51952295
>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>>> http://www.teotigraphix.com
>>>>>>> http://blog.teotigraphix.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ix Multimedia Software
>>>>>>
>>>>>> Jan Luykenstraat 27
>>>>>> 3521 VB Utrecht
>>>>>>
>>>>>> T. 06-51952295
>>>>>> I. www.ixsoftware.nl
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ix Multimedia Software
>>>>>
>>>>> Jan Luykenstraat 27
>>>>> 3521 VB Utrecht
>>>>>
>>>>> T. 06-51952295
>>>>> I. www.ixsoftware.nl
>>>>>
>>>>
>>>> --
>>>> Michael Schmalle - Teoti Graphix, LLC
>>>> http://www.teotigraphix.com
>>>> http://blog.teotigraphix.com
>>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Ah, I'm more sloppy than I thought, sorry again. I did test, but I had
that 'debug' method hanging around, so they all passed.

I like really atomic commits, but that's not at all that easy (I'm not
complaining, mind you), as the changes needed to make some tests pass
are all over the place ;-)

I guess things will improve when we get more experience with the
codebase and with working together, please be patient.

I think I'll take that week off now, too :-)

EdB



On Sun, Dec 30, 2012 at 9:08 PM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
> Erik,
>
> Did you run all the tests before you committed? I have 9 failures and had an
> error assertOutDebug not found.
>
> I also see now what happened to the semi-colan debacle.
>
> I should have told you this but when testing a function/method, it will not
> have the semi-colon because it's the larger container, in this case the
> TypeNode emit that will add the semi-colon. So you will test for semi-colons
> when you test a class with methods.
>
> I'm going to fix these tests so they all pass and commit them.
>
> In my experience working with large frameworks and testing them, its not a
> good idea to have a bunch of hanging code not committed. Since we are
> working together it will make it easier if you do more discrete commits
> right now.
>
> We also have to get rid of those NASTY globals, I'm going to add
> configuration variables soon for this so they get reset automatically
> (JSConfiguration) in the setup of the Backend.
>
> Remember run the whole suite before you commit, if you did and they all
> passed I think you are changing to much at a time. :)
>
>
> Mike
>
> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>
>> I've finished implementing the code to make the "Method Members" tests
>> pass. I needed to reroute some of the AS emitter code in order to
>> allow the JS emitter to override the writing of the function closing
>> block so I could output the closing semicolon, please feel free to
>> check my implementation and brutally comment on my hacks :-)
>>
>> EdB
>>
>>
>> On Sat, Dec 29, 2012 at 1:35 AM, Michael Schmalle
>> <ap...@teotigraphix.com> wrote:
>>>
>>>
>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>
>>>> Mike,
>>>>
>>>> New 'layout' looks great!
>>>
>>>
>>>
>>> I figured as much. I sat in front of the package explorer for about 30
>>> minutes thinking about package names in sentences. I knew I would be
>>> looking
>>> and searching through these for hours to come, if you see anything that
>>> should be changed, we should do it sooner than later.
>>>
>>>
>>>> I'm adding test classes one by one, when i have "all" the code for the
>>>> 'asserts' figured out. The tests will fail (obviously), but with the
>>>> tests in place if will be much easier for me to work on the actual
>>>> code. I'll be away for much of next week, but maybe I get some time
>>>> this weekend to work on this a bit more.
>>>
>>>
>>>
>>> Right, I'm sure you have a life as well. I might sneak in and make a
>>> couple
>>> tests work so it might help your context when doing your tasks.
>>>
>>> I think I am going to focus back on AS3 and the walker impl to get it
>>> more
>>> abstract. I'll hand the JS to you for the next couple weeks. :)
>>>
>>>
>>>> EdB
>>>>
>>>>
>>>> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl>
>>>> wrote:
>>>>>
>>>>>
>>>>> I'm on the commit list, and I try to make it a habit to Update before
>>>>> I start any work, so no need for a separate notification, but thanks.
>>>>>
>>>>> EdB
>>>>>
>>>>>
>>>>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>
>>>>>>
>>>>>> HAH!
>>>>>>
>>>>>> You got me, wow I was so organized starting this project. :)
>>>>>>
>>>>>> I'm looking about 1-2 hours if everything goes right. I hate these but
>>>>>> this
>>>>>> is what you get for being a mad scientist sometimes. After this we
>>>>>> should be
>>>>>> good to go, I think all the reorganization will make sense.
>>>>>>
>>>>>> I'll let you know when I commit if you aren't watching the commits
>>>>>> list.
>>>>>> It's funny, I now remember in the very beginning putting the tests in
>>>>>> js
>>>>>> and
>>>>>> thinking this doesn't make sense...
>>>>>>
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>>
>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>
>>>>>>> MIke,
>>>>>>>
>>>>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>>>>> I'll hold off on committing more tests and make them work on the
>>>>>>> 'new'
>>>>>>> code first, no worries.
>>>>>>>
>>>>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>>>>
>>>>>>> EdB
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Erik,
>>>>>>>>
>>>>>>>> FYI I am doing this refactor right now and it's big, so when you do
>>>>>>>> an
>>>>>>>> svn
>>>>>>>> update, you will have to rub your eyes for a second. I wanted to to
>>>>>>>> do
>>>>>>>> this,
>>>>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog'
>>>>>>>> gave
>>>>>>>> me
>>>>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think
>>>>>>>> you
>>>>>>>> meant
>>>>>>>> 'org.apache.flex.compiler'. :)
>>>>>>>>
>>>>>>>> Before I commit this huge update, I will make sure your tests are
>>>>>>>> running
>>>>>>>> correctly.
>>>>>>>>
>>>>>>>> Mike
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>>>
>>>>>>>>> Mike,
>>>>>>>>>
>>>>>>>>> While trying to stay out of your hair in the FalconJx code, I
>>>>>>>>> thought
>>>>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>>>>> output to tests for the JS + 'goog' output. I'm doing this by
>>>>>>>>> copying
>>>>>>>>> the AS tests, renaming them, converting them to subclasses of the
>>>>>>>>> AS
>>>>>>>>> tests and pointing them to the 'GoogBackend' (using the code from
>>>>>>>>> your
>>>>>>>>> test class).
>>>>>>>>>
>>>>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals'
>>>>>>>>> like
>>>>>>>>> 'classDefinition', which are not set when the methods are called
>>>>>>>>> from
>>>>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>>>>> general), so a little pointer on how to fix this would be much
>>>>>>>>> appreciated.
>>>>>>>>>
>>>>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented
>>>>>>>>> out)
>>>>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'.
>>>>>>>>> Maybe
>>>>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>>>>> 'goog' package, to increase the separation between them and other
>>>>>>>>> output types?
>>>>>>>>>
>>>>>>>>> EdB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ix Multimedia Software
>>>>>>>>>
>>>>>>>>> Jan Luykenstraat 27
>>>>>>>>> 3521 VB Utrecht
>>>>>>>>>
>>>>>>>>> T. 06-51952295
>>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>>>> http://www.teotigraphix.com
>>>>>>>> http://blog.teotigraphix.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ix Multimedia Software
>>>>>>>
>>>>>>> Jan Luykenstraat 27
>>>>>>> 3521 VB Utrecht
>>>>>>>
>>>>>>> T. 06-51952295
>>>>>>> I. www.ixsoftware.nl
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>> http://www.teotigraphix.com
>>>>>> http://blog.teotigraphix.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ix Multimedia Software
>>>>>
>>>>> Jan Luykenstraat 27
>>>>> 3521 VB Utrecht
>>>>>
>>>>> T. 06-51952295
>>>>> I. www.ixsoftware.nl
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>>
>>>
>>> --
>>> Michael Schmalle - Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>> http://blog.teotigraphix.com
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Erik,

Did you run all the tests before you committed? I have 9 failures and  
had an error assertOutDebug not found.

I also see now what happened to the semi-colan debacle.

I should have told you this but when testing a function/method, it  
will not have the semi-colon because it's the larger container, in  
this case the TypeNode emit that will add the semi-colon. So you will  
test for semi-colons when you test a class with methods.

I'm going to fix these tests so they all pass and commit them.

In my experience working with large frameworks and testing them, its  
not a good idea to have a bunch of hanging code not committed. Since  
we are working together it will make it easier if you do more discrete  
commits right now.

We also have to get rid of those NASTY globals, I'm going to add  
configuration variables soon for this so they get reset automatically  
(JSConfiguration) in the setup of the Backend.

Remember run the whole suite before you commit, if you did and they  
all passed I think you are changing to much at a time. :)

Mike

Quoting Erik de Bruin <er...@ixsoftware.nl>:

> I've finished implementing the code to make the "Method Members" tests
> pass. I needed to reroute some of the AS emitter code in order to
> allow the JS emitter to override the writing of the function closing
> block so I could output the closing semicolon, please feel free to
> check my implementation and brutally comment on my hacks :-)
>
> EdB
>
>
> On Sat, Dec 29, 2012 at 1:35 AM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> Mike,
>>>
>>> New 'layout' looks great!
>>
>>
>> I figured as much. I sat in front of the package explorer for about 30
>> minutes thinking about package names in sentences. I knew I would be looking
>> and searching through these for hours to come, if you see anything that
>> should be changed, we should do it sooner than later.
>>
>>
>>> I'm adding test classes one by one, when i have "all" the code for the
>>> 'asserts' figured out. The tests will fail (obviously), but with the
>>> tests in place if will be much easier for me to work on the actual
>>> code. I'll be away for much of next week, but maybe I get some time
>>> this weekend to work on this a bit more.
>>
>>
>> Right, I'm sure you have a life as well. I might sneak in and make a couple
>> tests work so it might help your context when doing your tasks.
>>
>> I think I am going to focus back on AS3 and the walker impl to get it more
>> abstract. I'll hand the JS to you for the next couple weeks. :)
>>
>>
>>> EdB
>>>
>>>
>>> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl>
>>> wrote:
>>>>
>>>> I'm on the commit list, and I try to make it a habit to Update before
>>>> I start any work, so no need for a separate notification, but thanks.
>>>>
>>>> EdB
>>>>
>>>>
>>>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>>>> <ap...@teotigraphix.com> wrote:
>>>>>
>>>>> HAH!
>>>>>
>>>>> You got me, wow I was so organized starting this project. :)
>>>>>
>>>>> I'm looking about 1-2 hours if everything goes right. I hate these but
>>>>> this
>>>>> is what you get for being a mad scientist sometimes. After this we
>>>>> should be
>>>>> good to go, I think all the reorganization will make sense.
>>>>>
>>>>> I'll let you know when I commit if you aren't watching the commits list.
>>>>> It's funny, I now remember in the very beginning putting the tests in js
>>>>> and
>>>>> thinking this doesn't make sense...
>>>>>
>>>>>
>>>>> Mike
>>>>>
>>>>>
>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>
>>>>>> MIke,
>>>>>>
>>>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>>>> I'll hold off on committing more tests and make them work on the 'new'
>>>>>> code first, no worries.
>>>>>>
>>>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>>>
>>>>>> EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Erik,
>>>>>>>
>>>>>>> FYI I am doing this refactor right now and it's big, so when you do an
>>>>>>> svn
>>>>>>> update, you will have to rub your eyes for a second. I wanted to to do
>>>>>>> this,
>>>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog'
>>>>>>> gave
>>>>>>> me
>>>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>>>>>> meant
>>>>>>> 'org.apache.flex.compiler'. :)
>>>>>>>
>>>>>>> Before I commit this huge update, I will make sure your tests are
>>>>>>> running
>>>>>>> correctly.
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>>
>>>>>>>> Mike,
>>>>>>>>
>>>>>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>>>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>>>>>> tests and pointing them to the 'GoogBackend' (using the code from
>>>>>>>> your
>>>>>>>> test class).
>>>>>>>>
>>>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>>>>>> 'classDefinition', which are not set when the methods are called from
>>>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>>>> general), so a little pointer on how to fix this would be much
>>>>>>>> appreciated.
>>>>>>>>
>>>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'.
>>>>>>>> Maybe
>>>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>>>> 'goog' package, to increase the separation between them and other
>>>>>>>> output types?
>>>>>>>>
>>>>>>>> EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ix Multimedia Software
>>>>>>>>
>>>>>>>> Jan Luykenstraat 27
>>>>>>>> 3521 VB Utrecht
>>>>>>>>
>>>>>>>> T. 06-51952295
>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>>> http://www.teotigraphix.com
>>>>>>> http://blog.teotigraphix.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ix Multimedia Software
>>>>>>
>>>>>> Jan Luykenstraat 27
>>>>>> 3521 VB Utrecht
>>>>>>
>>>>>> T. 06-51952295
>>>>>> I. www.ixsoftware.nl
>>>>>>
>>>>>
>>>>> --
>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>> http://www.teotigraphix.com
>>>>> http://blog.teotigraphix.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
The only thing I see that you might want to think about is "context".

When adding api like that specifically for overriding in a subclass I  
would pass the node context being overridden;

writeBlockClose(IContainerNode node);

This will allow subclasses to do further analysis of the node in  
question since were are not saving state in the emitter.

 From that node alone, you can traverse the AST and find out exactly  
where you are at all times.

For performance reasons, I think it's better to use append() instead  
of + in Java? I think using the + concatenation does double duty when  
your already using a StringBuilder.

             code.append(rest.getName() + " = "
                     + "Array.prototype.slice.call(arguments, "
                     + (pnodes.length - 1)
                     + ");\n");


PS I'm going to send you the formatter xml for eclipse that I am suing  
so you can easily format the code.


Mike

Quoting Erik de Bruin <er...@ixsoftware.nl>:

> I've finished implementing the code to make the "Method Members" tests
> pass. I needed to reroute some of the AS emitter code in order to
> allow the JS emitter to override the writing of the function closing
> block so I could output the closing semicolon, please feel free to
> check my implementation and brutally comment on my hacks :-)
>
> EdB
>
>
> On Sat, Dec 29, 2012 at 1:35 AM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> Mike,
>>>
>>> New 'layout' looks great!
>>
>>
>> I figured as much. I sat in front of the package explorer for about 30
>> minutes thinking about package names in sentences. I knew I would be looking
>> and searching through these for hours to come, if you see anything that
>> should be changed, we should do it sooner than later.
>>
>>
>>> I'm adding test classes one by one, when i have "all" the code for the
>>> 'asserts' figured out. The tests will fail (obviously), but with the
>>> tests in place if will be much easier for me to work on the actual
>>> code. I'll be away for much of next week, but maybe I get some time
>>> this weekend to work on this a bit more.
>>
>>
>> Right, I'm sure you have a life as well. I might sneak in and make a couple
>> tests work so it might help your context when doing your tasks.
>>
>> I think I am going to focus back on AS3 and the walker impl to get it more
>> abstract. I'll hand the JS to you for the next couple weeks. :)
>>
>>
>>> EdB
>>>
>>>
>>> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl>
>>> wrote:
>>>>
>>>> I'm on the commit list, and I try to make it a habit to Update before
>>>> I start any work, so no need for a separate notification, but thanks.
>>>>
>>>> EdB
>>>>
>>>>
>>>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>>>> <ap...@teotigraphix.com> wrote:
>>>>>
>>>>> HAH!
>>>>>
>>>>> You got me, wow I was so organized starting this project. :)
>>>>>
>>>>> I'm looking about 1-2 hours if everything goes right. I hate these but
>>>>> this
>>>>> is what you get for being a mad scientist sometimes. After this we
>>>>> should be
>>>>> good to go, I think all the reorganization will make sense.
>>>>>
>>>>> I'll let you know when I commit if you aren't watching the commits list.
>>>>> It's funny, I now remember in the very beginning putting the tests in js
>>>>> and
>>>>> thinking this doesn't make sense...
>>>>>
>>>>>
>>>>> Mike
>>>>>
>>>>>
>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>
>>>>>> MIke,
>>>>>>
>>>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>>>> I'll hold off on committing more tests and make them work on the 'new'
>>>>>> code first, no worries.
>>>>>>
>>>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>>>
>>>>>> EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Erik,
>>>>>>>
>>>>>>> FYI I am doing this refactor right now and it's big, so when you do an
>>>>>>> svn
>>>>>>> update, you will have to rub your eyes for a second. I wanted to to do
>>>>>>> this,
>>>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog'
>>>>>>> gave
>>>>>>> me
>>>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>>>>>> meant
>>>>>>> 'org.apache.flex.compiler'. :)
>>>>>>>
>>>>>>> Before I commit this huge update, I will make sure your tests are
>>>>>>> running
>>>>>>> correctly.
>>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>>
>>>>>>>> Mike,
>>>>>>>>
>>>>>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>>>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>>>>>> tests and pointing them to the 'GoogBackend' (using the code from
>>>>>>>> your
>>>>>>>> test class).
>>>>>>>>
>>>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>>>>>> 'classDefinition', which are not set when the methods are called from
>>>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>>>> general), so a little pointer on how to fix this would be much
>>>>>>>> appreciated.
>>>>>>>>
>>>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'.
>>>>>>>> Maybe
>>>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>>>> 'goog' package, to increase the separation between them and other
>>>>>>>> output types?
>>>>>>>>
>>>>>>>> EdB
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ix Multimedia Software
>>>>>>>>
>>>>>>>> Jan Luykenstraat 27
>>>>>>>> 3521 VB Utrecht
>>>>>>>>
>>>>>>>> T. 06-51952295
>>>>>>>> I. www.ixsoftware.nl
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>>> http://www.teotigraphix.com
>>>>>>> http://blog.teotigraphix.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ix Multimedia Software
>>>>>>
>>>>>> Jan Luykenstraat 27
>>>>>> 3521 VB Utrecht
>>>>>>
>>>>>> T. 06-51952295
>>>>>> I. www.ixsoftware.nl
>>>>>>
>>>>>
>>>>> --
>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>> http://www.teotigraphix.com
>>>>> http://blog.teotigraphix.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Erik de Bruin <er...@ixsoftware.nl>.
I've finished implementing the code to make the "Method Members" tests
pass. I needed to reroute some of the AS emitter code in order to
allow the JS emitter to override the writing of the function closing
block so I could output the closing semicolon, please feel free to
check my implementation and brutally comment on my hacks :-)

EdB


On Sat, Dec 29, 2012 at 1:35 AM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
>
> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>
>> Mike,
>>
>> New 'layout' looks great!
>
>
> I figured as much. I sat in front of the package explorer for about 30
> minutes thinking about package names in sentences. I knew I would be looking
> and searching through these for hours to come, if you see anything that
> should be changed, we should do it sooner than later.
>
>
>> I'm adding test classes one by one, when i have "all" the code for the
>> 'asserts' figured out. The tests will fail (obviously), but with the
>> tests in place if will be much easier for me to work on the actual
>> code. I'll be away for much of next week, but maybe I get some time
>> this weekend to work on this a bit more.
>
>
> Right, I'm sure you have a life as well. I might sneak in and make a couple
> tests work so it might help your context when doing your tasks.
>
> I think I am going to focus back on AS3 and the walker impl to get it more
> abstract. I'll hand the JS to you for the next couple weeks. :)
>
>
>> EdB
>>
>>
>> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl>
>> wrote:
>>>
>>> I'm on the commit list, and I try to make it a habit to Update before
>>> I start any work, so no need for a separate notification, but thanks.
>>>
>>> EdB
>>>
>>>
>>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>>> <ap...@teotigraphix.com> wrote:
>>>>
>>>> HAH!
>>>>
>>>> You got me, wow I was so organized starting this project. :)
>>>>
>>>> I'm looking about 1-2 hours if everything goes right. I hate these but
>>>> this
>>>> is what you get for being a mad scientist sometimes. After this we
>>>> should be
>>>> good to go, I think all the reorganization will make sense.
>>>>
>>>> I'll let you know when I commit if you aren't watching the commits list.
>>>> It's funny, I now remember in the very beginning putting the tests in js
>>>> and
>>>> thinking this doesn't make sense...
>>>>
>>>>
>>>> Mike
>>>>
>>>>
>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>
>>>>> MIke,
>>>>>
>>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>>> I'll hold off on committing more tests and make them work on the 'new'
>>>>> code first, no worries.
>>>>>
>>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>>
>>>>> EdB
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>>> <ap...@teotigraphix.com> wrote:
>>>>>>
>>>>>>
>>>>>> Erik,
>>>>>>
>>>>>> FYI I am doing this refactor right now and it's big, so when you do an
>>>>>> svn
>>>>>> update, you will have to rub your eyes for a second. I wanted to to do
>>>>>> this,
>>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog'
>>>>>> gave
>>>>>> me
>>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>>>>> meant
>>>>>> 'org.apache.flex.compiler'. :)
>>>>>>
>>>>>> Before I commit this huge update, I will make sure your tests are
>>>>>> running
>>>>>> correctly.
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>>
>>>>>>
>>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>>
>>>>>>> Mike,
>>>>>>>
>>>>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>>>>> tests and pointing them to the 'GoogBackend' (using the code from
>>>>>>> your
>>>>>>> test class).
>>>>>>>
>>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>>>>> 'classDefinition', which are not set when the methods are called from
>>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>>> general), so a little pointer on how to fix this would be much
>>>>>>> appreciated.
>>>>>>>
>>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'.
>>>>>>> Maybe
>>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>>> 'goog' package, to increase the separation between them and other
>>>>>>> output types?
>>>>>>>
>>>>>>> EdB
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ix Multimedia Software
>>>>>>>
>>>>>>> Jan Luykenstraat 27
>>>>>>> 3521 VB Utrecht
>>>>>>>
>>>>>>> T. 06-51952295
>>>>>>> I. www.ixsoftware.nl
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>>> http://www.teotigraphix.com
>>>>>> http://blog.teotigraphix.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ix Multimedia Software
>>>>>
>>>>> Jan Luykenstraat 27
>>>>> 3521 VB Utrecht
>>>>>
>>>>> T. 06-51952295
>>>>> I. www.ixsoftware.nl
>>>>>
>>>>
>>>> --
>>>> Michael Schmalle - Teoti Graphix, LLC
>>>> http://www.teotigraphix.com
>>>> http://blog.teotigraphix.com
>>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Quoting Erik de Bruin <er...@ixsoftware.nl>:

> Mike,
>
> New 'layout' looks great!

I figured as much. I sat in front of the package explorer for about 30  
minutes thinking about package names in sentences. I knew I would be  
looking and searching through these for hours to come, if you see  
anything that should be changed, we should do it sooner than later.

> I'm adding test classes one by one, when i have "all" the code for the
> 'asserts' figured out. The tests will fail (obviously), but with the
> tests in place if will be much easier for me to work on the actual
> code. I'll be away for much of next week, but maybe I get some time
> this weekend to work on this a bit more.

Right, I'm sure you have a life as well. I might sneak in and make a  
couple tests work so it might help your context when doing your tasks.

I think I am going to focus back on AS3 and the walker impl to get it  
more abstract. I'll hand the JS to you for the next couple weeks. :)

> EdB
>
>
> On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
>> I'm on the commit list, and I try to make it a habit to Update before
>> I start any work, so no need for a separate notification, but thanks.
>>
>> EdB
>>
>>
>> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
>> <ap...@teotigraphix.com> wrote:
>>> HAH!
>>>
>>> You got me, wow I was so organized starting this project. :)
>>>
>>> I'm looking about 1-2 hours if everything goes right. I hate these but this
>>> is what you get for being a mad scientist sometimes. After this we  
>>> should be
>>> good to go, I think all the reorganization will make sense.
>>>
>>> I'll let you know when I commit if you aren't watching the commits list.
>>> It's funny, I now remember in the very beginning putting the tests  
>>> in js and
>>> thinking this doesn't make sense...
>>>
>>>
>>> Mike
>>>
>>>
>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>
>>>> MIke,
>>>>
>>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>>> I'll hold off on committing more tests and make them work on the 'new'
>>>> code first, no worries.
>>>>
>>>> And I did mean "org.apache.flex.js", it is the package structure for
>>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>>
>>>> EdB
>>>>
>>>>
>>>>
>>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>>> <ap...@teotigraphix.com> wrote:
>>>>>
>>>>> Erik,
>>>>>
>>>>> FYI I am doing this refactor right now and it's big, so when you do an
>>>>> svn
>>>>> update, you will have to rub your eyes for a second. I wanted to to do
>>>>> this,
>>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog' gave
>>>>> me
>>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>>>> meant
>>>>> 'org.apache.flex.compiler'. :)
>>>>>
>>>>> Before I commit this huge update, I will make sure your tests are running
>>>>> correctly.
>>>>>
>>>>> Mike
>>>>>
>>>>>
>>>>>
>>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>>
>>>>>> Mike,
>>>>>>
>>>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>>>> I might spend some time translating the tests you wrote for the AS
>>>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>>>> tests and pointing them to the 'GoogBackend' (using the code from your
>>>>>> test class).
>>>>>>
>>>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>>>> 'classDefinition', which are not set when the methods are called from
>>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>>> general), so a little pointer on how to fix this would be much
>>>>>> appreciated.
>>>>>>
>>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
>>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>>> 'goog' package, to increase the separation between them and other
>>>>>> output types?
>>>>>>
>>>>>> EdB
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ix Multimedia Software
>>>>>>
>>>>>> Jan Luykenstraat 27
>>>>>> 3521 VB Utrecht
>>>>>>
>>>>>> T. 06-51952295
>>>>>> I. www.ixsoftware.nl
>>>>>>
>>>>>
>>>>> --
>>>>> Michael Schmalle - Teoti Graphix, LLC
>>>>> http://www.teotigraphix.com
>>>>> http://blog.teotigraphix.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>>
>>>
>>> --
>>> Michael Schmalle - Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>> http://blog.teotigraphix.com
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Mike,

New 'layout' looks great!

I'm adding test classes one by one, when i have "all" the code for the
'asserts' figured out. The tests will fail (obviously), but with the
tests in place if will be much easier for me to work on the actual
code. I'll be away for much of next week, but maybe I get some time
this weekend to work on this a bit more.

EdB


On Fri, Dec 28, 2012 at 12:34 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> I'm on the commit list, and I try to make it a habit to Update before
> I start any work, so no need for a separate notification, but thanks.
>
> EdB
>
>
> On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>> HAH!
>>
>> You got me, wow I was so organized starting this project. :)
>>
>> I'm looking about 1-2 hours if everything goes right. I hate these but this
>> is what you get for being a mad scientist sometimes. After this we should be
>> good to go, I think all the reorganization will make sense.
>>
>> I'll let you know when I commit if you aren't watching the commits list.
>> It's funny, I now remember in the very beginning putting the tests in js and
>> thinking this doesn't make sense...
>>
>>
>> Mike
>>
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> MIke,
>>>
>>> When do you expect this 'mother of all refactors' to land? If 'soon',
>>> I'll hold off on committing more tests and make them work on the 'new'
>>> code first, no worries.
>>>
>>> And I did mean "org.apache.flex.js", it is the package structure for
>>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>>
>>> EdB
>>>
>>>
>>>
>>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>>> <ap...@teotigraphix.com> wrote:
>>>>
>>>> Erik,
>>>>
>>>> FYI I am doing this refactor right now and it's big, so when you do an
>>>> svn
>>>> update, you will have to rub your eyes for a second. I wanted to to do
>>>> this,
>>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog' gave
>>>> me
>>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>>> meant
>>>> 'org.apache.flex.compiler'. :)
>>>>
>>>> Before I commit this huge update, I will make sure your tests are running
>>>> correctly.
>>>>
>>>> Mike
>>>>
>>>>
>>>>
>>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>>
>>>>> Mike,
>>>>>
>>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>>> I might spend some time translating the tests you wrote for the AS
>>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>>> tests and pointing them to the 'GoogBackend' (using the code from your
>>>>> test class).
>>>>>
>>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>>> 'classDefinition', which are not set when the methods are called from
>>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>>> general), so a little pointer on how to fix this would be much
>>>>> appreciated.
>>>>>
>>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
>>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>>> 'goog' package, to increase the separation between them and other
>>>>> output types?
>>>>>
>>>>> EdB
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ix Multimedia Software
>>>>>
>>>>> Jan Luykenstraat 27
>>>>> 3521 VB Utrecht
>>>>>
>>>>> T. 06-51952295
>>>>> I. www.ixsoftware.nl
>>>>>
>>>>
>>>> --
>>>> Michael Schmalle - Teoti Graphix, LLC
>>>> http://www.teotigraphix.com
>>>> http://blog.teotigraphix.com
>>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Erik de Bruin <er...@ixsoftware.nl>.
I'm on the commit list, and I try to make it a habit to Update before
I start any work, so no need for a separate notification, but thanks.

EdB


On Fri, Dec 28, 2012 at 12:31 PM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
> HAH!
>
> You got me, wow I was so organized starting this project. :)
>
> I'm looking about 1-2 hours if everything goes right. I hate these but this
> is what you get for being a mad scientist sometimes. After this we should be
> good to go, I think all the reorganization will make sense.
>
> I'll let you know when I commit if you aren't watching the commits list.
> It's funny, I now remember in the very beginning putting the tests in js and
> thinking this doesn't make sense...
>
>
> Mike
>
>
> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>
>> MIke,
>>
>> When do you expect this 'mother of all refactors' to land? If 'soon',
>> I'll hold off on committing more tests and make them work on the 'new'
>> code first, no worries.
>>
>> And I did mean "org.apache.flex.js", it is the package structure for
>> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>>
>> EdB
>>
>>
>>
>> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
>> <ap...@teotigraphix.com> wrote:
>>>
>>> Erik,
>>>
>>> FYI I am doing this refactor right now and it's big, so when you do an
>>> svn
>>> update, you will have to rub your eyes for a second. I wanted to to do
>>> this,
>>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog' gave
>>> me
>>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you
>>> meant
>>> 'org.apache.flex.compiler'. :)
>>>
>>> Before I commit this huge update, I will make sure your tests are running
>>> correctly.
>>>
>>> Mike
>>>
>>>
>>>
>>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>>
>>>> Mike,
>>>>
>>>> While trying to stay out of your hair in the FalconJx code, I thought
>>>> I might spend some time translating the tests you wrote for the AS
>>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>>> the AS tests, renaming them, converting them to subclasses of the AS
>>>> tests and pointing them to the 'GoogBackend' (using the code from your
>>>> test class).
>>>>
>>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>>> 'classDefinition', which are not set when the methods are called from
>>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>>> general), so a little pointer on how to fix this would be much
>>>> appreciated.
>>>>
>>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
>>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>>> 'goog' package, to increase the separation between them and other
>>>> output types?
>>>>
>>>> EdB
>>>>
>>>>
>>>>
>>>> --
>>>> Ix Multimedia Software
>>>>
>>>> Jan Luykenstraat 27
>>>> 3521 VB Utrecht
>>>>
>>>> T. 06-51952295
>>>> I. www.ixsoftware.nl
>>>>
>>>
>>> --
>>> Michael Schmalle - Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>> http://blog.teotigraphix.com
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
HAH!

You got me, wow I was so organized starting this project. :)

I'm looking about 1-2 hours if everything goes right. I hate these but  
this is what you get for being a mad scientist sometimes. After this  
we should be good to go, I think all the reorganization will make sense.

I'll let you know when I commit if you aren't watching the commits  
list. It's funny, I now remember in the very beginning putting the  
tests in js and thinking this doesn't make sense...

Mike


Quoting Erik de Bruin <er...@ixsoftware.nl>:

> MIke,
>
> When do you expect this 'mother of all refactors' to land? If 'soon',
> I'll hold off on committing more tests and make them work on the 'new'
> code first, no worries.
>
> And I did mean "org.apache.flex.js", it is the package structure for
> 'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?
>
> EdB
>
>
>
> On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>> Erik,
>>
>> FYI I am doing this refactor right now and it's big, so when you do an svn
>> update, you will have to rub your eyes for a second. I wanted to to do this,
>> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog' gave me
>> the reason. ;-) There is no 'org.apache.flex.js' package, I think you meant
>> 'org.apache.flex.compiler'. :)
>>
>> Before I commit this huge update, I will make sure your tests are running
>> correctly.
>>
>> Mike
>>
>>
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> Mike,
>>>
>>> While trying to stay out of your hair in the FalconJx code, I thought
>>> I might spend some time translating the tests you wrote for the AS
>>> output to tests for the JS + 'goog' output. I'm doing this by copying
>>> the AS tests, renaming them, converting them to subclasses of the AS
>>> tests and pointing them to the 'GoogBackend' (using the code from your
>>> test class).
>>>
>>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>>> 'classDefinition', which are not set when the methods are called from
>>> the tests. I'm not very familiar with JUnit (or unit testing in
>>> general), so a little pointer on how to fix this would be much
>>> appreciated.
>>>
>>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
>>> we want to put the 'goog' Emitter classes of the compiler also in a
>>> 'goog' package, to increase the separation between them and other
>>> output types?
>>>
>>> EdB
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Erik de Bruin <er...@ixsoftware.nl>.
MIke,

When do you expect this 'mother of all refactors' to land? If 'soon',
I'll hold off on committing more tests and make them work on the 'new'
code first, no worries.

And I did mean "org.apache.flex.js", it is the package structure for
'compiler.jx.tests'... Maybe that also needs 'a little' refactoring?

EdB



On Fri, Dec 28, 2012 at 12:15 PM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
> Erik,
>
> FYI I am doing this refactor right now and it's big, so when you do an svn
> update, you will have to rub your eyes for a second. I wanted to to do this,
> now your tests in the 'org.apache.flex.js.internal.js.codegen.goog' gave me
> the reason. ;-) There is no 'org.apache.flex.js' package, I think you meant
> 'org.apache.flex.compiler'. :)
>
> Before I commit this huge update, I will make sure your tests are running
> correctly.
>
> Mike
>
>
>
> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>
>> Mike,
>>
>> While trying to stay out of your hair in the FalconJx code, I thought
>> I might spend some time translating the tests you wrote for the AS
>> output to tests for the JS + 'goog' output. I'm doing this by copying
>> the AS tests, renaming them, converting them to subclasses of the AS
>> tests and pointing them to the 'GoogBackend' (using the code from your
>> test class).
>>
>> An observation: some methods of JSGoogEmitter rely on 'globals' like
>> 'classDefinition', which are not set when the methods are called from
>> the tests. I'm not very familiar with JUnit (or unit testing in
>> general), so a little pointer on how to fix this would be much
>> appreciated.
>>
>> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
>> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
>> we want to put the 'goog' Emitter classes of the compiler also in a
>> 'goog' package, to increase the separation between them and other
>> output types?
>>
>> EdB
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Erik,

FYI I am doing this refactor right now and it's big, so when you do an  
svn update, you will have to rub your eyes for a second. I wanted to  
to do this, now your tests in the  
'org.apache.flex.js.internal.js.codegen.goog' gave me the reason. ;-)  
There is no 'org.apache.flex.js' package, I think you meant  
'org.apache.flex.compiler'. :)

Before I commit this huge update, I will make sure your tests are  
running correctly.

Mike


Quoting Erik de Bruin <er...@ixsoftware.nl>:

> Mike,
>
> While trying to stay out of your hair in the FalconJx code, I thought
> I might spend some time translating the tests you wrote for the AS
> output to tests for the JS + 'goog' output. I'm doing this by copying
> the AS tests, renaming them, converting them to subclasses of the AS
> tests and pointing them to the 'GoogBackend' (using the code from your
> test class).
>
> An observation: some methods of JSGoogEmitter rely on 'globals' like
> 'classDefinition', which are not set when the methods are called from
> the tests. I'm not very familiar with JUnit (or unit testing in
> general), so a little pointer on how to fix this would be much
> appreciated.
>
> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
> we want to put the 'goog' Emitter classes of the compiler also in a
> 'goog' package, to increase the separation between them and other
> output types?
>
> EdB
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [FalconJx::TestGoogXYZ] Creating tests for emmitters

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Quoting Erik de Bruin <er...@ixsoftware.nl>:

> Mike,
>
> While trying to stay out of your hair in the FalconJx code, I thought
> I might spend some time translating the tests you wrote for the AS
> output to tests for the JS + 'goog' output. I'm doing this by copying
> the AS tests, renaming them, converting them to subclasses of the AS
> tests and pointing them to the 'GoogBackend' (using the code from your
> test class).

The GoogBackend needs to be made a class, that was just a quick java  
inner class for the test. I will move it into the goog package I  
mention below.


> An observation: some methods of JSGoogEmitter rely on 'globals' like
> 'classDefinition', which are not set when the methods are called from
> the tests. I'm not very familiar with JUnit (or unit testing in
> general), so a little pointer on how to fix this would be much
> appreciated.

Actually, they are not really globals. They are reminiscent of the  
initial prototype and should be removed. I decided to use AST for any  
TypeNode quires since I wanted granular testing. Actually from what I  
remember, I'm really not using them because the AS tests wouldn't work  
if I was dependent on them.

Now looking at the code, yeah I refactored them out of the AS  
production code but I didn't get to the goog emitter, that was a copy  
and paste of some commented out code before the AS refactor.

>
> Meanwhile I'll put all the tests (with the 'assertOut' commented out)
> in a 'goog' package in 'org.apache.flex.js.internal.js.codegen'. Maybe
> we want to put the 'goog' Emitter classes of the compiler also in a
> 'goog' package, to increase the separation between them and other
> output types?

Right, I was getting to that as well. When I'm programming this type  
of stuff, sometimes its like lightning and I just want to get an idea  
out and not worry about the bookkeeping. :)

Probably; org.apache.flex.compiler.internal.js.goog, I think the  
codgen should be more abstract js stuff in there.

I'm going to do one more refactor on the emitter and docemitter. I'm  
half way done. Then I will move some packages around like we said,  
things should be pretty stable from the stand point of where classes  
and interfaces go.

If I have a question I'll ask your opinion about placement.

Mike


> EdB
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com