This commit is contained in:
2026-03-07 22:23:51 +07:00
commit 35e2bf2746
4 changed files with 49 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import org.junit.Test;
import static org.junit.Assert.*;
public class MainTest
{
@Test
public void test_1()
{
assertEquals(2, Main.smallestSubarrayLength(new int[]{2, 3, 1, 2, 4, 3}, 7));
}
@Test
public void test_2()
{
assertEquals(0, Main.smallestSubarrayLength(new int[]{1, 2, 3, 4}, 20));
}
@Test
public void test_3()
{
assertEquals(2, Main.smallestSubarrayLength(new int[]{1, 2, 3, 4, 5}, 9));
}
}