Exemplo n.º 1
0
 // ISourceRange getNameRange();
 @Test
 public void getNameRange() throws Exception {
   module.open(null);
   final IErlElement element = module.getElementAt(1);
   final IErlAttribute attribute = (IErlAttribute) element;
   final ISourceRange nameRange = attribute.getNameRange();
   assertEquals(0, nameRange.getOffset());
   assertEquals(12, nameRange.getLength());
 }
Exemplo n.º 2
0
 // void setNameRange(int offset, int length);
 @Test
 public void setNameRange() throws Exception {
   module.open(null);
   final IErlElement element = module.getElementAt(1);
   final IErlAttribute attribute = (IErlAttribute) element;
   final int offset = 1, length = 2;
   attribute.setNameRange(offset, length);
   final ISourceRange nameRange = attribute.getNameRange();
   assertEquals(offset, nameRange.getOffset());
   assertEquals(length, nameRange.getLength());
 }