use of com.facebook.buck.step.TargetDevice in project buck by facebook.
the class JavaTestRuleTest method shouldAddEmulatorTargetDeviceToVmArgsIfPresent.
@Test
public void shouldAddEmulatorTargetDeviceToVmArgsIfPresent() throws Exception {
ImmutableList<String> vmArgs = ImmutableList.of("--one");
JavaTest rule = newRule(vmArgs);
TargetDevice device = new TargetDevice(TargetDevice.Type.EMULATOR, Optional.empty());
ImmutableList<String> amended = rule.amendVmArgs(vmArgs, createMock(SourcePathResolver.class), Optional.of(device));
ImmutableList<String> expected = ImmutableList.of("--one", "-Dbuck.device=emulator");
assertEquals(expected, amended);
}
use of com.facebook.buck.step.TargetDevice in project buck by facebook.
the class TargetDeviceCommandLineOptionsTest method shouldReturnADeviceIfOnlyDeviceFlagSet.
@Test
public void shouldReturnADeviceIfOnlyDeviceFlagSet() {
TargetDeviceCommandLineOptions options = buildOptions("-d");
TargetDevice device = options.getTargetDeviceOptional().get();
assertFalse(device.isEmulator());
assertFalse(device.getIdentifier().isPresent());
}
Aggregations