From 2d36f9d296d3a6feb8e8bdeeab24e9145af39bdc Mon Sep 17 00:00:00 2001 From: Jan Eglinger Date: Tue, 19 Jul 2022 10:11:23 +0200 Subject: [PATCH] SwingNumberWidgetTest: add BigInteger parameter Previous to https://github.com/scijava/scijava-ui-swing/commit/40bd474d8b9b169d521a621ddf9772a718ce6e26, this would throw a NullPointerException. Fixes https://github.com/scijava/scijava-ui-swing/issues/70. --- .../org/scijava/ui/swing/widget/SwingNumberWidgetTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/scijava/ui/swing/widget/SwingNumberWidgetTest.java b/src/test/java/org/scijava/ui/swing/widget/SwingNumberWidgetTest.java index 7bde962..399604e 100644 --- a/src/test/java/org/scijava/ui/swing/widget/SwingNumberWidgetTest.java +++ b/src/test/java/org/scijava/ui/swing/widget/SwingNumberWidgetTest.java @@ -109,7 +109,8 @@ private String[] getExpectedValues() { "1.000", "1.0000", "1.000", - "1.0000" + "1.0000", + "0" }; } @@ -135,6 +136,9 @@ private String createScript() { "#@ Double (value=1, min=0, max=10, stepSize=0.001, persist=false, style=\"slider,format:0.0000\") n\n" + "#@ Double (value=1, min=0, max=10, stepSize=0.001, persist=false, style=\"scroll bar\") o\n" + "#@ Double (value=1, min=0, max=10, stepSize=0.001, persist=false, style=\"scroll bar,format:0.0000\") p\n" + + "\n" + + "// BigInteger without min, max, stepSize\n" + + "#@ BigInteger (persist=false) q\n" + ""; return script; }