diff options
| author | Tor Norbye <tnorbye@google.com> | 2014-10-19 12:21:07 -0700 |
|---|---|---|
| committer | Tor Norbye <tnorbye@google.com> | 2014-10-19 12:21:07 -0700 |
| commit | ec22cc9cd64f8e450e64c54699625412094e3f73 (patch) | |
| tree | 101f3d07056e33cadfe9ef383ab3cf78b151bf33 /sdkmanager | |
| parent | 18a2075c2cda8633fcc58ca92e12fb983fabf957 (diff) | |
| download | platform_tools_swt-ec22cc9cd64f8e450e64c54699625412094e3f73.tar.gz platform_tools_swt-ec22cc9cd64f8e450e64c54699625412094e3f73.tar.bz2 platform_tools_swt-ec22cc9cd64f8e450e64c54699625412094e3f73.zip | |
Update unit tests for SWT-based SDK manager with new devices
Change-Id: I518fa5a42570f814d6d1a60660e7e608c7c8bb7a
Diffstat (limited to 'sdkmanager')
| -rwxr-xr-x | sdkmanager/app/src/test/java/com/android/sdkmanager/SdkManagerTest2.java | 48 | ||||
| -rwxr-xr-x | sdkmanager/sdkuilib/src/test/java/com/android/sdkuilib/internal/widgets/AvdCreationDialogTest.java | 60 |
2 files changed, 63 insertions, 45 deletions
diff --git a/sdkmanager/app/src/test/java/com/android/sdkmanager/SdkManagerTest2.java b/sdkmanager/app/src/test/java/com/android/sdkmanager/SdkManagerTest2.java index 0812643..1b92426 100755 --- a/sdkmanager/app/src/test/java/com/android/sdkmanager/SdkManagerTest2.java +++ b/sdkmanager/app/src/test/java/com/android/sdkmanager/SdkManagerTest2.java @@ -100,8 +100,10 @@ public class SdkManagerTest2 extends SdkManagerTestCase { "P Nexus 10\n" + "P Nexus 4\n" + "P Nexus 5\n" + + "P Nexus 6\n" + "P Nexus 7 2013\n" + "P Nexus 7\n" + + "P Nexus 9\n" + "P Nexus One\n" + "P Nexus S\n" + "P 2.7in QVGA\n" + @@ -168,79 +170,87 @@ public class SdkManagerTest2 extends SdkManagerTestCase { "P Name: Nexus 5\n" + "P OEM : Google\n" + "P ---------\n" + - "P id: 10 or \"Nexus 7 2013\"\n" + + "P id: 10 or \"Nexus 6\"\n" + + "P Name: Nexus 6\n" + + "P OEM : Google\n" + + "P ---------\n" + + "P id: 11 or \"Nexus 7 2013\"\n" + "P Name: Nexus 7\n" + "P OEM : Google\n" + "P ---------\n" + - "P id: 11 or \"Nexus 7\"\n" + + "P id: 12 or \"Nexus 7\"\n" + "P Name: Nexus 7 (2012)\n" + "P OEM : Google\n" + "P ---------\n" + - "P id: 12 or \"Nexus One\"\n" + + "P id: 13 or \"Nexus 9\"\n" + + "P Name: Nexus 9\n" + + "P OEM : Google\n" + + "P ---------\n" + + "P id: 14 or \"Nexus One\"\n" + "P Name: Nexus One\n" + "P OEM : Google\n" + "P ---------\n" + - "P id: 13 or \"Nexus S\"\n" + + "P id: 15 or \"Nexus S\"\n" + "P Name: Nexus S\n" + "P OEM : Google\n" + "P ---------\n" + - "P id: 14 or \"2.7in QVGA\"\n" + + "P id: 16 or \"2.7in QVGA\"\n" + "P Name: 2.7\" QVGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 15 or \"2.7in QVGA slider\"\n" + + "P id: 17 or \"2.7in QVGA slider\"\n" + "P Name: 2.7\" QVGA slider\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 16 or \"3.2in HVGA slider (ADP1)\"\n" + + "P id: 18 or \"3.2in HVGA slider (ADP1)\"\n" + "P Name: 3.2\" HVGA slider (ADP1)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 17 or \"3.2in QVGA (ADP2)\"\n" + + "P id: 19 or \"3.2in QVGA (ADP2)\"\n" + "P Name: 3.2\" QVGA (ADP2)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 18 or \"3.3in WQVGA\"\n" + + "P id: 20 or \"3.3in WQVGA\"\n" + "P Name: 3.3\" WQVGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 19 or \"3.4in WQVGA\"\n" + + "P id: 21 or \"3.4in WQVGA\"\n" + "P Name: 3.4\" WQVGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 20 or \"3.7 FWVGA slider\"\n" + + "P id: 22 or \"3.7 FWVGA slider\"\n" + "P Name: 3.7\" FWVGA slider\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 21 or \"3.7in WVGA (Nexus One)\"\n" + + "P id: 23 or \"3.7in WVGA (Nexus One)\"\n" + "P Name: 3.7\" WVGA (Nexus One)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 22 or \"4in WVGA (Nexus S)\"\n" + + "P id: 24 or \"4in WVGA (Nexus S)\"\n" + "P Name: 4\" WVGA (Nexus S)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 23 or \"4.65in 720p (Galaxy Nexus)\"\n" + + "P id: 25 or \"4.65in 720p (Galaxy Nexus)\"\n" + "P Name: 4.65\" 720p (Galaxy Nexus)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 24 or \"4.7in WXGA\"\n" + + "P id: 26 or \"4.7in WXGA\"\n" + "P Name: 4.7\" WXGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 25 or \"5.1in WVGA\"\n" + + "P id: 27 or \"5.1in WVGA\"\n" + "P Name: 5.1\" WVGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 26 or \"5.4in FWVGA\"\n" + + "P id: 28 or \"5.4in FWVGA\"\n" + "P Name: 5.4\" FWVGA\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 27 or \"7in WSVGA (Tablet)\"\n" + + "P id: 29 or \"7in WSVGA (Tablet)\"\n" + "P Name: 7\" WSVGA (Tablet)\n" + "P OEM : Generic\n" + "P ---------\n" + - "P id: 28 or \"10.1in WXGA (Tablet)\"\n" + + "P id: 30 or \"10.1in WXGA (Tablet)\"\n" + "P Name: 10.1\" WXGA (Tablet)\n" + "P OEM : Generic\n", getLog().toString()); diff --git a/sdkmanager/sdkuilib/src/test/java/com/android/sdkuilib/internal/widgets/AvdCreationDialogTest.java b/sdkmanager/sdkuilib/src/test/java/com/android/sdkuilib/internal/widgets/AvdCreationDialogTest.java index b4cd022..e9dd6e7 100755 --- a/sdkmanager/sdkuilib/src/test/java/com/android/sdkuilib/internal/widgets/AvdCreationDialogTest.java +++ b/sdkmanager/sdkuilib/src/test/java/com/android/sdkuilib/internal/widgets/AvdCreationDialogTest.java @@ -82,6 +82,8 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { " Device: [-1]\n" + " - Nexus 7 (2012) (7.0\", 800 × 1280: tvdpi)\n" + " - Nexus 5 (4.95\", 1080 × 1920: xxhdpi)\n" + + " - Nexus 6 (5.96\", 1440 × 2560: 560dpi)\n" + + " - Nexus 9 (8.86\", 2048 × 1536: xhdpi)\n" + " - Nexus 4 (4.7\", 768 × 1280: xhdpi)\n" + " - Nexus 10 (10.055\", 2560 × 1600: xhdpi)\n" + " - Nexus 7 (7.02\", 1200 × 1920: xhdpi)\n" + @@ -159,6 +161,8 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { " Device: [-1]\n" + " - Nexus 7 (2012) (7.0\", 800 × 1280: tvdpi)\n" + " - Nexus 5 (4.95\", 1080 × 1920: xxhdpi)\n" + + " - Nexus 6 (5.96\", 1440 × 2560: 560dpi)\n" + + " - Nexus 9 (8.86\", 2048 × 1536: xhdpi)\n" + " - Nexus 4 (4.7\", 768 × 1280: xhdpi)\n" + " - Nexus 10 (10.055\", 2560 × 1600: xhdpi)\n" + " - Nexus 7 (7.02\", 1200 × 1920: xhdpi)\n" + @@ -220,6 +224,8 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { " Device: [-1]\n" + " - Nexus 7 (2012) (7.0\", 800 × 1280: tvdpi)\n" + " - Nexus 5 (4.95\", 1080 × 1920: xxhdpi)\n" + + " - Nexus 6 (5.96\", 1440 × 2560: 560dpi)\n" + + " - Nexus 9 (8.86\", 2048 × 1536: xhdpi)\n" + " - Nexus 4 (4.7\", 768 × 1280: xhdpi)\n" + " - Nexus 10 (10.055\", 2560 × 1600: xhdpi)\n" + " - Nexus 7 (7.02\", 1200 × 1920: xhdpi)\n" + @@ -278,14 +284,14 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { "@@ -2 +2\n" + "- AVD Name: \n" + "+ AVD Name: the_avd_name\n" + - "@@ -51 +51\n" + + "@@ -53 +53\n" + "- Status: AVD Name cannot be empty\n" + - "@@ -52 +51\n" + + "@@ -54 +53\n" + "+ Status: No device selected\n", SdkTestCase.getDiff(last, r)); // select Nexus S device - a.selectComboIndex(Ctrl.COMBO_DEVICE, 6); + a.selectComboIndex(Ctrl.COMBO_DEVICE, 8); p.onDeviceComboChanged(); last = r; @@ -293,11 +299,11 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { assertEquals( "@@ -3 +3\n" + "- Device: [-1]\n" + - "+ Device: [6]\n" + - "@@ -10 +10\n" + + "+ Device: [8]\n" + + "@@ -12 +12\n" + "- - Nexus S (4.0\", 480 × 800: hdpi)\n" + "+ ** Nexus S (4.0\", 480 × 800: hdpi)\n" + - "@@ -38 +38\n" + + "@@ -40 +40\n" + "- -- Front Cam: [-1]\n" + "- -- Back Cam: [-1]\n" + "- RAM: \n" + @@ -306,9 +312,9 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { "+ Back Cam: [-1]\n" + "+ RAM: 343\n" + "+ VM : 32\n" + - "@@ -51 +51\n" + + "@@ -53 +53\n" + "- Status: No device selected\n" + - "@@ -52 +51\n" + + "@@ -54 +53\n" + "+ Status: No target selected\n", SdkTestCase.getDiff(last, r)); @@ -319,21 +325,21 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { last = r; r = v.renderDialog(); assertEquals( - "@@ -31 +31\n" + + "@@ -33 +33\n" + "- Target: [-1]\n" + "- - Android 0.0 - API Level 0\n" + "+ Target: [0]\n" + "+ ** Android 0.0 - API Level 0\n" + - "@@ -34 +34\n" + + "@@ -36 +36\n" + "+ - ARM (arm64-v8a)\n" + "+ - ARM (armeabi-v7a)\n" + "+ - Intel Atom (x86)\n" + "+ - Intel Atom (x86_64)\n" + - "@@ -38 +42\n" + + "@@ -40 +44\n" + "+ - HVGA\n" + - "@@ -51 +56\n" + + "@@ -53 +58\n" + "- Status: No target selected\n" + - "@@ -52 +56\n" + + "@@ -54 +58\n" + "+ Status: No CPU/ABI system image selected\n", SdkTestCase.getDiff(last, r)); @@ -344,14 +350,14 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { last = r; r = v.renderDialog(); assertEquals( - "@@ -33 +33\n" + + "@@ -35 +35\n" + "- CPU/ABI: [-1]\n" + "- - ARM (arm64-v8a)\n" + "+ CPU/ABI: [0]\n" + "+ ** ARM (arm64-v8a)\n" + - "@@ -56 +56\n" + + "@@ -58 +58\n" + "- Status: No CPU/ABI system image selected\n" + - "@@ -57 +56\n" + + "@@ -59 +58\n" + "+ Status: No skin selected\n", SdkTestCase.getDiff(last, r)); @@ -362,14 +368,14 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { last = r; r = v.renderDialog(); assertEquals( - "@@ -39 +39\n" + + "@@ -41 +41\n" + "- Skin: [-1]\n" + "- - Skin with dynamic hardware controls\n" + "+ Skin: [0]\n" + "+ ** Skin with dynamic hardware controls\n" + - "@@ -56 +56\n" + + "@@ -58 +58\n" + "- Status: No skin selected\n" + - "@@ -57 +56\n" + + "@@ -59 +58\n" + "+ Status: Invalid Data partition size.\n", SdkTestCase.getDiff(last, r)); @@ -381,14 +387,14 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { last = r; r = v.renderDialog(); assertEquals( - "@@ -47 +47\n" + + "@@ -49 +49\n" + "- Data Size: \n" + "- Data Unit: [-1]\n" + "+ Data Size: 200\n" + "+ Data Unit: [0]\n" + - "@@ -56 +56\n" + + "@@ -58 +58\n" + "- Status: Invalid Data partition size.\n" + - "@@ -57 +56\n" + + "@@ -59 +58\n" + "+ Status: SD Card path isn't valid.\n", SdkTestCase.getDiff(last, r)); @@ -404,17 +410,17 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { last = r; r = v.renderDialog(); assertEquals( - "@@ -49 +49\n" + + "@@ -51 +51\n" + "- [ ] SD by Size\n" + "- SD Size: \n" + "- SD Unit: [-1]\n" + "+ [x] SD by Size\n" + "+ SD Size: 16\n" + "+ SD Unit: [1]\n" + - "@@ -55 +55\n" + + "@@ -57 +57\n" + "- Icon: reject_icon16.png\n" + "- Status: SD Card path isn't valid.\n" + - "@@ -57 +55\n" + + "@@ -59 +57\n" + "+ Icon: null\n" + "+ Status: \n" + "+ \n", @@ -425,9 +431,11 @@ public class AvdCreationDialogTest extends SdkManagerTestCase { assertEquals( "Title: Create new Android Virtual Device (AVD)\n" + " AVD Name: the_avd_name\n" + - " Device: [6]\n" + + " Device: [8]\n" + " - Nexus 7 (2012) (7.0\", 800 × 1280: tvdpi)\n" + " - Nexus 5 (4.95\", 1080 × 1920: xxhdpi)\n" + + " - Nexus 6 (5.96\", 1440 × 2560: 560dpi)\n" + + " - Nexus 9 (8.86\", 2048 × 1536: xhdpi)\n" + " - Nexus 4 (4.7\", 768 × 1280: xhdpi)\n" + " - Nexus 10 (10.055\", 2560 × 1600: xhdpi)\n" + " - Nexus 7 (7.02\", 1200 × 1920: xhdpi)\n" + |
