Merge "USB: Add NCM functions to related tests"
This commit is contained in:
@@ -117,6 +117,7 @@ public class UsbManagerTestLib {
|
||||
testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP);
|
||||
testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI);
|
||||
testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS);
|
||||
testGetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM);
|
||||
}
|
||||
|
||||
public void testSetCurrentFunctions_shouldMatched() {
|
||||
@@ -125,5 +126,6 @@ public class UsbManagerTestLib {
|
||||
testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_PTP);
|
||||
testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_MIDI);
|
||||
testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_RNDIS);
|
||||
testSetCurrentFunctionsMock_Matched(UsbManager.FUNCTION_NCM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,14 @@ public class UsbHandlerTest {
|
||||
assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_RNDIS, 0);
|
||||
}
|
||||
|
||||
@SmallTest
|
||||
@Test
|
||||
public void setFunctionsNcm() {
|
||||
mUsbHandler.handleMessage(mUsbHandler.obtainMessage(MSG_SET_CURRENT_FUNCTIONS,
|
||||
UsbManager.FUNCTION_NCM));
|
||||
assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_NCM, 0);
|
||||
}
|
||||
|
||||
@SmallTest
|
||||
@Test
|
||||
public void setFunctionsNcmAndRndis() {
|
||||
|
||||
Reference in New Issue
Block a user