cmsdk: Fix BuildTests. Bump parcelable version.

Change-Id: I3084acfa25ca6bd6f5a058995906a050e243a4c9
This commit is contained in:
Adnan Begovic 2016-01-19 13:43:16 -08:00
parent 735333ce4a
commit 80001bff72
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ public class Build {
* {@link CM_VERSION_CODES}
* @hide
*/
public static final int PARCELABLE_VERSION = CM_VERSION_CODES.DRAGON_FRUIT;
public static final int PARCELABLE_VERSION = CM_VERSION_CODES.ELDERBERRY;
/** A build ID utilized to distinguish cyanogenmod versions */
public static final String CYANOGENMOD_VERSION = "ro.cm.version";

View File

@ -38,20 +38,20 @@ public class BuildTest extends AndroidTestCase {
@SmallTest
public void testSdkApiLevelCurrent() {
assertEquals(Build.CM_VERSION_CODES.DRAGON_FRUIT, Build.CM_VERSION.SDK_INT);
assertEquals(Build.PARCELABLE_VERSION, Build.CM_VERSION.SDK_INT);
}
@SmallTest
public void testSdkApiLevelCanMatch() {
String apiName = Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT);
assertNotNull(apiName);
assertEquals(Build.getNameForSDKInt(Build.CM_VERSION_CODES.DRAGON_FRUIT), apiName);
assertEquals(Build.getNameForSDKInt(Build.PARCELABLE_VERSION), apiName);
}
@SmallTest
public void testSdkApiLevelSkippedIfGreaterThanAllowed() {
int i = 0;
if (Build.CM_VERSION.SDK_INT > Build.CM_VERSION_CODES.DRAGON_FRUIT + 1) {
if (Build.CM_VERSION.SDK_INT > Build.PARCELABLE_VERSION + 1) {
i++;
}
assertEquals(0, i);