harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharindu Mathew" <mcclou...@gmail.com>
Subject Re: [harmony-demo-1] Help with visPosCalled in CompositeView_VisualPositionTest
Date Thu, 31 Jul 2008 17:17:51 GMT
Hi,

I have tried various approaches to solve the problems in this test for about
1.5 weeks, but it appears to me that there is something wrong in the
fundamental design of this test or I cannot comprehend what the test is
expected to perform.

Listed are what I've found:

1) The visual position is tested through the calling of assertNextPosition
and then checking the values of the arrayLists visPosCalled and flipCalled
to verify the visual position has moved.

2) The test implements inner classes  for the ViewFactory class, which
implements an inner class for GlyphView which adds elements to visPosCalled
through getNextVisualPositionFrom method. The test also implements the
BoxView class which adds elements to flipCalled through
flipEastAndWestAtEnds method. Note that flipEastAndWestAtEnds is a protected
method

3) The assertNextPosition method calls the getNextVisualPositionFrom of the
BoxView object and then check the values of visPosCalled and flipCalled. So
this method should call the overridden methods getNextVisualPositionFrom
method of through the factory class. And flipEastAndWestAtEnds should be
called through this since it is a protected method.

4) Since the BoxView is not instantiated through the ViewFactory this is
never done and all tests fail.

I have tried including entries in visPosCalled through other means and
corrected some errors, but this method is not what the test is designed for
and doesn't do justice to the test.

I've tried creating the BoxView through the factory but then I cannot
override the methods as an inner class.

Regards,

Tharindu


On Sat, Jul 19, 2008 at 4:58 PM, Alexei Zakharov
<alexei.zakharov@gmail.com>wrote:

> It is in
> <SWING_ROOT>/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java:149
>   visPosCalled.add(new VisPosCallResult(this, pos, b, result, biasRet[0]));
>
> Regards,
> Alexei
>
> 2008/7/19 Tharindu Mathew <mccloud35@gmail.com>:
> > I'm having a problem with the injection:
> >
> >  grep -rI visPosCalled working_classlib/modules/swing/  | grep add
> >
> working_classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java:
> > visPosCalled.add(new VisPosCallResult(this, pos, b, result, biasRet[0]));
> > bash: syntax error near unexpected token `('
> >
> > Regards,
> >
> > Tharindu
> >
> > On Sat, Jul 12, 2008 at 5:08 PM, Alexei Fedotov <
> alexei.fedotov@gmail.com>
> > wrote:
> >
> >> Hello Tharindu,
> >>
> >> Here is the injection:
> >>
> >> $ grep -rI visPosCalled working_classlib/modules/swing/  | grep add
> >>
> >>
> working_classlib/modules/swing/src/test/api/java.injected/javax/swing/text/CompositeView_VisualPositionTest.java:
> >>                       visPosCalled.add(new VisPosCallResult(this,
> >> pos, b, result, biasRet[0]));
> >>
> >> Thanks!
> >>
> >> On Fri, Jul 11, 2008 at 8:44 PM, Tharindu Mathew <mccloud35@gmail.com>
> >> wrote:
> >> > Lost of tests are failing in the above test due to verifications such
> as:
> >> >
> >> >  assertEquals(1, visPosCalled.size())
> >> >
> >> > But I cannot find any method that inserts elements into this arraylist
> >> > called visPosCalled!!
> >> >
> >> > Can anyone enlighten me regarding this situation?
> >> >
> >> > Regards,
> >> >
> >> > Tharindu
> >> >
> >>
> >>
> >>
> >> --
> >> With best regards,
> >> Alexei
> >>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message