import com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration;
import com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier;
+import com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier.Density;
import junit.framework.TestCase;
}
public void testCheckAndSet() {
- assertEquals(true, pdq.checkAndSet("123dpi", config));//$NON-NLS-1$
+ assertEquals(true, pdq.checkAndSet("ldpi", config));//$NON-NLS-1$
assertTrue(config.getPixelDensityQualifier() != null);
- assertEquals(123, config.getPixelDensityQualifier().getValue());
- assertEquals("123dpi", config.getPixelDensityQualifier().toString()); //$NON-NLS-1$
+ assertEquals(Density.LOW, config.getPixelDensityQualifier().getValue());
+ assertEquals("ldpi", config.getPixelDensityQualifier().toString()); //$NON-NLS-1$
}
public void testFailures() {
assertEquals(false, pdq.checkAndSet("", config));//$NON-NLS-1$
assertEquals(false, pdq.checkAndSet("dpi", config));//$NON-NLS-1$
- assertEquals(false, pdq.checkAndSet("123DPI", config));//$NON-NLS-1$
+ assertEquals(false, pdq.checkAndSet("123dpi", config));//$NON-NLS-1$
assertEquals(false, pdq.checkAndSet("123", config));//$NON-NLS-1$
assertEquals(false, pdq.checkAndSet("sdfdpi", config));//$NON-NLS-1$
}
null, // network code
null, // language
null, // region
+ null, // screen size
+ null, // screen ratio
null, // screen orientation
null, // dpi
null, // touch mode
null, // keyboard state
null, // text input
null, // navigation
- null); // screen size
+ null, // screen dimension
+ null);// version
addFolder(mResources, defaultConfig, validMemberList);
null, // network code
"en", // language
null, // region
+ null, // screen size
+ null, // screen ratio
null, // screen orientation
null, // dpi
null, // touch mode
KeyboardState.EXPOSED.getValue(), // keyboard state
null, // text input
null, // navigation
- null); // screen size
+ null, // screen dimension
+ null);// version
addFolder(mResources, config1, validMemberList);
null, // network code
"en", // language
null, // region
+ null, // screen size
+ null, // screen ratio
null, // screen orientation
null, // dpi
null, // touch mode
KeyboardState.HIDDEN.getValue(), // keyboard state
null, // text input
null, // navigation
- null); // screen size
+ null, // screen dimension
+ null);// version
addFolder(mResources, config2, validMemberList);
null, // network code
"en", // language
null, // region
+ null, // screen size
+ null, // screen ratio
ScreenOrientation.LANDSCAPE.getValue(), // screen orientation
null, // dpi
null, // touch mode
null, // keyboard state
null, // text input
null, // navigation
- null); // screen size
+ null, // screen dimension
+ null);// version
addFolder(mResources, config3, validMemberList);
"mnc435", // network code
"en", // language
"rUS", // region
+ "normal", // screen size
+ "notlong", // screen ratio
ScreenOrientation.LANDSCAPE.getValue(), // screen orientation
- "160dpi", // dpi
+ "mdpi", // dpi
TouchScreenType.FINGER.getValue(), // touch mode
KeyboardState.EXPOSED.getValue(), // keyboard state
TextInputMethod.QWERTY.getValue(), // text input
NavigationMethod.DPAD.getValue(), // navigation
- "480x320"); // screen size
+ "480x320", // screen dimension
+ "v3"); // version
addFolder(mResources, config4, invalidMemberList);
}
"mnc435", // network code
"en", // language
"rUS", // region
+ "normal", // screen size
+ "notlong", // screen ratio
ScreenOrientation.LANDSCAPE.getValue(), // screen orientation
- "160dpi", // dpi
+ "mdpi", // dpi
TouchScreenType.FINGER.getValue(), // touch mode
KeyboardState.EXPOSED.getValue(), // keyboard state
TextInputMethod.QWERTY.getValue(), // text input
NavigationMethod.DPAD.getValue(), // navigation
- "480x320"); // screen size
+ "480x320", // screen dimension
+ "v3"); // version
ResourceFile result = mResources.getMatchingFile(SEARCHED_FILENAME,
ResourceFolderType.LAYOUT, testConfig);