test: adjust test for SDK S/T

This commit is contained in:
Connor Tumbleson 2021-08-29 06:52:38 -04:00 committed by Connor Tumbleson
parent f4a75fe761
commit caee50b35b

View File

@ -18,11 +18,9 @@ package brut.androlib.androlib;
import brut.androlib.BaseTest; import brut.androlib.BaseTest;
import brut.androlib.res.AndrolibResources; import brut.androlib.res.AndrolibResources;
import org.junit.Test;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.junit.*;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
public class InvalidSdkBoundingTest extends BaseTest { public class InvalidSdkBoundingTest extends BaseTest {
@ -75,6 +73,16 @@ public class InvalidSdkBoundingTest extends BaseTest {
assertEquals("25", androlibResources.checkTargetSdkVersionBounds()); assertEquals("25", androlibResources.checkTargetSdkVersionBounds());
} }
@Test
public void checkForShortHandSTag() {
AndrolibResources androlibResources = new AndrolibResources();
Map<String, String> sdkInfo = new LinkedHashMap<>();
sdkInfo.put("targetSdkVersion", "S");
androlibResources.setSdkInfo(sdkInfo);
assertEquals("31", androlibResources.checkTargetSdkVersionBounds());
}
@Test @Test
public void checkForShortHandSdkTag() { public void checkForShortHandSdkTag() {
@ -92,7 +100,7 @@ public class InvalidSdkBoundingTest extends BaseTest {
AndrolibResources androlibResources = new AndrolibResources(); AndrolibResources androlibResources = new AndrolibResources();
Map<String, String> sdkInfo = new LinkedHashMap<>(); Map<String, String> sdkInfo = new LinkedHashMap<>();
sdkInfo.put("targetSdkVersion", "S"); sdkInfo.put("targetSdkVersion", "T");
androlibResources.setSdkInfo(sdkInfo); androlibResources.setSdkInfo(sdkInfo);
assertEquals("10000", androlibResources.checkTargetSdkVersionBounds()); assertEquals("10000", androlibResources.checkTargetSdkVersionBounds());