Code example for SpannedString

Methods: getSpanStartgetSpans, length

0
		assertEquals("https://github.com/Uncodin/bypass", spans[0].getURL());
	} 
	 
	public void testHeaderOrder() { 
		SpannedString spannable = (SpannedString) bypass.markdownToSpannable("Header!!\n--------\nText goes here or something\n*One* **Two** ***Three***\n");
		RelativeSizeSpan[] sizeSpan = spannable.getSpans(0, spannable.length(), RelativeSizeSpan.class);
		assertEquals(1, sizeSpan.length);
		assertEquals(0, spannable.getSpanStart(sizeSpan[0]));
	} 
 
	public void testCodeSpan() { 
		Spannable spannable = (Spannable) bypass.markdownToSpannable("`code`");
		TypefaceSpan[] spans = spannable.getSpans(0, spannable.length(), TypefaceSpan.class);
		assertEquals(1, spans.length);
		assertEquals(0, spannable.getSpanStart(spans[0]));
	} 
}