mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GT-3620 PdbSymbolParser naive parse bug checkin
This commit is contained in:
parent
0164286d03
commit
dde3f4aa8c
2 changed files with 19 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
package ghidra.app.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -68,10 +68,10 @@ public class SymbolPathParserTest extends AbstractGTest {
|
|||
|
||||
@Test
|
||||
public void testNamespaceInFunctionArgument() {
|
||||
List<String> list = SymbolPathParser.parse( "Foo7::Bar5(class Foo1d::Bar1,int)");
|
||||
List<String> expected = new ArrayList<>();
|
||||
expected.add("Foo7");
|
||||
expected.add("Bar5(class Foo1d::Bar1,int)");
|
||||
List<String> list = SymbolPathParser.parse("Foo7::Bar5(class Foo1d::Bar1,int)");
|
||||
List<String> expected = new ArrayList<>();
|
||||
expected.add("Foo7");
|
||||
expected.add("Bar5(class Foo1d::Bar1,int)");
|
||||
assertListEqualOrdered(expected, list);
|
||||
}
|
||||
|
||||
|
@ -118,4 +118,16 @@ public class SymbolPathParserTest extends AbstractGTest {
|
|||
assertListEqualOrdered(expected, list);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSpecialCharAfterDelimiter1() {
|
||||
String name = "A::B::C<wchar_t,A::B::D<wchar_t>,A::B::E<wchar_t> >::<unnamed-tag>";
|
||||
List<String> list = SymbolPathParser.parse(name);
|
||||
List<String> expected = new ArrayList<>();
|
||||
expected.add("A");
|
||||
expected.add("B");
|
||||
expected.add("C<wchar_t,A::B::D<wchar_t>,A::B::E<wchar_t> >");
|
||||
expected.add("<unnamed-tag>");
|
||||
assertListEqualOrdered(expected, list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue