From 349156c2c38633812285d9fe1797627957bada27 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Thu, 1 Aug 2024 08:58:26 -0400 Subject: [PATCH] whoops we actually did need to fuzz shorts --- .../edu/berkeley/cs/jqf/fuzz/ei/ZestGuidance.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ZestGuidance.java b/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ZestGuidance.java index 5b1e95789..18f22a1c7 100644 --- a/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ZestGuidance.java +++ b/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ZestGuidance.java @@ -1628,8 +1628,15 @@ public Input fuzz(Random random) { case Byte: newInput.set(offset + 1, setToZero ? 0 : (byte) random.nextInt(256)); break; - case Short: - throw new GuidanceException("Short type not supported"); + case Short: + if (setToZero) { + newInput.set(offset + 1, (byte) 0); + newInput.set(offset + 2, (byte) 0); + } else { + newInput.set(offset + 1, (byte) random.nextInt(256)); + newInput.set(offset + 2, (byte) random.nextInt(256)); + } + break; case Integer: int newIValue = random.nextInt(); if(setToZero){