mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 00:36:16 +02:00
Fixed name bug for macro names.
This commit is contained in:
parent
f2488626d4
commit
63ffe8d959
2 changed files with 11 additions and 1 deletions
|
@ -101,9 +101,12 @@ public class DOMLocationTests extends AST2BaseTest {
|
|||
assertNotNull( macros );
|
||||
assertEquals( macros.length, 1 );
|
||||
assertSoleLocation( macros[0], code.indexOf( "#"), code.indexOf( "0x01") + 4 - code.indexOf( "#")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
assertEquals( macros[0].getName().toString(), "FOOT" ); //$NON-NLS-1$
|
||||
assertEquals( macros[0].getExpansion(), "0x01"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param declarator
|
||||
* @param offset
|
||||
|
|
|
@ -186,6 +186,13 @@ public class LocationMap implements ILocationResolver, IScannerPreprocessorLog {
|
|||
public char[] toCharArray() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
return new String( name );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @author jcamelon
|
||||
|
|
Loading…
Add table
Reference in a new issue