private void checkContains(Spanned text,String[] spans,String spanName,int start,int end) throws Exception {
  for (  String i : spans) {
    if (i.equals(spanName)) {
      assertEquals(start,text.getSpanStart(i));
      assertEquals(end,text.getSpanEnd(i));
      return;
    }
  }
  fail();
}

private void checkContains ( Spanned text , String [ ] spans , String spanName , int start , int end ) throws Exception { for ( String i : spans ) { if ( i . equals ( spanName ) ) { assertEquals ( start , text . getSpanStart ( i ) ) ; assertEquals ( end , text . getSpanEnd ( i ) ) ; return ; } } fail ( ) ; }
fail unless text + spans contains a span ' spanname ' with the given start and end .
