File tree Expand file tree Collapse file tree
src/processing/mode/java/debug
test/processing/mode/java/debug Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public class VariableNode implements MutableTreeNode {
5656 public static final int TYPE_VOID = 11 ;
5757
5858 private static final Pattern ARRAY_REGEX = Pattern .compile (
59- "^(?<prefix>[^\\ ]] +)(?<unbounded>(\\ [\\ ])*)(?<bounded>(\\ [\\ d+\\ ])+).* $"
59+ "^(?<prefix>[^\\ [] +)(?<unbounded>(\\ [\\ ])*)(?<bounded>(\\ [\\ d+\\ ])+)(?<unneeded>[^ \\ []*) $"
6060 );
6161
6262 protected String type ;
Original file line number Diff line number Diff line change @@ -74,9 +74,16 @@ public void describeNestedArrayMixed() {
7474
7575 @ Test
7676 public void describeArrayFailsafe () {
77- Value value = buildMockValue ("instance of int[x][7] (id=998 )" );
77+ Value value = buildMockValue ("instance of int[x][7] (id=98 )" );
7878 VariableNode node = new VariableNode ("test" , "int[][][][]" , value );
79- Assert .assertEquals (node .getStringValue (), "instance of int[x][7] (id=998));
79+ Assert .assertEquals (node .getStringValue (), "instance of int[x][7] (id=98)" );
80+ }
81+
82+ @ Test
83+ public void describeArrayUnexpectedOrder () {
84+ Value value = buildMockValue ("instance of int[7][] (id=98)" );
85+ VariableNode node = new VariableNode ("test" , "int[][][][]" , value );
86+ Assert .assertEquals (node .getStringValue (), "instance of int[7][] (id=98)" );
8087 }
8188
8289 private Value buildMockValue (String toStringValue ) {
You can’t perform that action at this time.
0 commit comments