private void verifyWordLimits(String text,int pos,int correctStart,int correctEnd) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  mTv.setText(text,TextView.BufferType.SPANNABLE);
  long limits=(Long)mGetWordLimits.invoke(mTv,new Object[]{new Integer(pos)});
  int actualStart=(int)(limits >>> 32);
  int actualEnd=(int)(limits & 0x00000000FFFFFFFFL);
  assertEquals(correctStart,actualStart);
  assertEquals(correctEnd,actualEnd);
}

private void verifyWordLimits ( String text , int pos , int correctStart , int correctEnd ) throws IllegalArgumentException , IllegalAccessException , InvocationTargetException { mTv . setText ( text , TextView . BufferType . SPANNABLE ) ; long limits = ( Long ) mGetWordLimits . invoke ( mTv , new Object [ ] { new Integer ( pos ) } ) ; int actualStart = ( int ) ( limits > > > 32 ) ; int actualEnd = ( int ) ( limits & 0x00000000FFFFFFFFL ) ; assertEquals ( correctStart , actualStart ) ; assertEquals ( correctEnd , actualEnd ) ; }
calculate and verify word limits . depends on the textview implementation . uses a private method and internal data representation .
