mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
Support integer properties in breakpoint comments in debugger tests
GitOrigin-RevId: 27a65ac9b0ca9e4d3519d19b1d324d22eb5ff607
This commit is contained in:
committed by
intellij-monorepo-bot
parent
89b1cc2ee6
commit
4e1d336e51
@@ -108,6 +108,20 @@ public final class BreakpointComment {
|
||||
throw error("Invalid boolean value '" + value + "' for '" + name + "'", index.get(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a named integer property of the breakpoint.
|
||||
*/
|
||||
public @Nullable Integer readIntValue(@NotNull String name) {
|
||||
String value = readValue(name);
|
||||
if (value == null) return null;
|
||||
try {
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
throw error("Invalid integer value '" + value + "' for '" + name + "'", index.get(name));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a string like {@code "Included,-ExceptionTest,-com.intellij.rt.*"} into
|
||||
* two lists of included and excluded class filters.
|
||||
|
||||
+2
-2
@@ -446,10 +446,10 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
|
||||
systemPrintln("LogExpression = " + logExpression);
|
||||
}
|
||||
|
||||
String passCount = comment.readValue("Pass count");
|
||||
Integer passCount = comment.readIntValue("Pass count");
|
||||
if (passCount != null) {
|
||||
breakpoint.setCountFilterEnabled(true);
|
||||
breakpoint.setCountFilter(Integer.parseInt(passCount));
|
||||
breakpoint.setCountFilter(passCount);
|
||||
systemPrintln("Pass count = " + passCount);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user