Yes, I don't see a way to simplify the code with "real" Ranges here. The 
test cases should be clear and minimal by writing `Seq((X, 0, 2), (Y, 2, 
4))`.

On 01/22/2013 09:58 AM, Mirco Dotta wrote:
>
> In 
> org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/lexical/ScalaCodeScannerTest.scala:
>
> > +
> > +import org.junit.{ ComparisonFailure, Ignore, Test }
> > +
> > +import scalariform.ScalaVersions
> > +
> > +class ScalaCodeScannerTest {
> > +
> > +  /**
> > +   * Tokenizes the complete content as a Scala source code snippet.
> > +   *
> > +   * There is a sequence returned containing tuples where each tuple value
> > +   * represents a token. The first element is the `ScalaSyntaxClass` specifying
> > +   * the the type of the token. The second element is the offset of the token
> > +   * and the last element is its length.
> > +   */
> > +  def tokenize(str: String): Seq[(ScalaSyntaxClass, Int, Int)] =
>
> By the way, I understand you did it this way because of 
> |ITokenScanner|, so if my suggestion doesn't make sense (or you think 
> it would make the code harder to understand), then ignore my above 
> comment.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/scala-ide/scala-ide/pull/279/files#r2723110>.
>