aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/google/devtools/build/android/ConvertersTest.java8
-rw-r--r--src/test/java/com/google/devtools/build/android/RClassGeneratorActionTest.java56
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java4
3 files changed, 27 insertions, 41 deletions
diff --git a/src/test/java/com/google/devtools/build/android/ConvertersTest.java b/src/test/java/com/google/devtools/build/android/ConvertersTest.java
index 937435da67..4e8f7058c1 100644
--- a/src/test/java/com/google/devtools/build/android/ConvertersTest.java
+++ b/src/test/java/com/google/devtools/build/android/ConvertersTest.java
@@ -21,10 +21,8 @@ import com.google.devtools.build.android.Converters.PathConverter;
import com.google.devtools.build.android.Converters.PathListConverter;
import com.google.devtools.build.android.Converters.StringDictionaryConverter;
import com.google.devtools.common.options.OptionsParsingException;
-import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
@@ -39,8 +37,6 @@ import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public final class ConvertersTest {
- private static final String SEPARATOR = File.pathSeparator;
-
@Rule public final TemporaryFolder tmp = new TemporaryFolder();
@Rule
@@ -89,9 +85,7 @@ public final class ConvertersTest {
@Test
public void testPathListConverter() throws Exception {
PathListConverter converter = new PathListConverter();
- List<Path> result =
- converter.convert("foo" + SEPARATOR + "bar" + SEPARATOR + SEPARATOR + "baz" + SEPARATOR);
- assertThat(result)
+ assertThat(converter.convert("foo:bar::baz:"))
.containsAllOf(Paths.get("foo"), Paths.get("bar"), Paths.get("baz"))
.inOrder();
}
diff --git a/src/test/java/com/google/devtools/build/android/RClassGeneratorActionTest.java b/src/test/java/com/google/devtools/build/android/RClassGeneratorActionTest.java
index e18f466060..e03348cdaa 100644
--- a/src/test/java/com/google/devtools/build/android/RClassGeneratorActionTest.java
+++ b/src/test/java/com/google/devtools/build/android/RClassGeneratorActionTest.java
@@ -19,7 +19,6 @@ import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
-import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
@@ -111,20 +110,16 @@ public class RClassGeneratorActionTest {
RClassGeneratorAction.main(
ImmutableList.<String>of(
- "--primaryRTxt",
- binarySymbols.toString(),
- "--primaryManifest",
- binaryManifest.toString(),
- "--libraries",
- libFooSymbols
- + File.pathSeparator
- + libFooManifest
- + ","
- + libBarSymbols
- + File.pathSeparator
- + libBarManifest,
- "--classJarOutput",
- jarPath.toString())
+ "--primaryRTxt",
+ binarySymbols.toString(),
+ "--primaryManifest",
+ binaryManifest.toString(),
+ "--library",
+ libFooSymbols + "," + libFooManifest,
+ "--library",
+ libBarSymbols + "," + libBarManifest,
+ "--classJarOutput",
+ jarPath.toString())
.toArray(new String[0]));
assertThat(Files.exists(jarPath)).isTrue();
@@ -171,14 +166,10 @@ public class RClassGeneratorActionTest {
RClassGeneratorAction.main(
ImmutableList.<String>of(
- "--libraries",
- libFooSymbols
- + File.pathSeparator
- + libFooManifest
- + ","
- + libBarSymbols
- + File.pathSeparator
- + libBarManifest,
+ "--library",
+ libFooSymbols + "," + libFooManifest,
+ "--library",
+ libBarSymbols + "," + libBarManifest,
"--classJarOutput",
jarPath.toString())
.toArray(new String[0]));
@@ -281,15 +272,16 @@ public class RClassGeneratorActionTest {
Path jarPath = tempDir.resolve("app_resources.jar");
RClassGeneratorAction.main(
ImmutableList.<String>of(
- "--primaryRTxt",
- binarySymbols.toString(),
- "--primaryManifest",
- binaryManifest.toString(),
- "--packageForR", "com.custom.er",
- "--libraries",
- libFooSymbols + File.pathSeparator + libFooManifest,
- "--classJarOutput",
- jarPath.toString())
+ "--primaryRTxt",
+ binarySymbols.toString(),
+ "--primaryManifest",
+ binaryManifest.toString(),
+ "--packageForR",
+ "com.custom.er",
+ "--library",
+ libFooSymbols + "," + libFooManifest,
+ "--classJarOutput",
+ jarPath.toString())
.toArray(new String[0]));
assertThat(Files.exists(jarPath)).isTrue();
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
index 62c5057d8e..f305c3efa1 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
@@ -1810,7 +1810,7 @@ public class AndroidBinaryTest extends AndroidBuildViewTestCase {
assertThat(compilerAction.getMnemonic()).isEqualTo("RClassGenerator");
List<String> args = compilerAction.getArguments();
assertThat(args)
- .containsAllOf("--primaryRTxt", "--primaryManifest", "--libraries", "--classJarOutput");
+ .containsAllOf("--primaryRTxt", "--primaryManifest", "--library", "--classJarOutput");
}
@Test
@@ -1853,7 +1853,7 @@ public class AndroidBinaryTest extends AndroidBuildViewTestCase {
assertThat(compilerAction.getMnemonic()).isEqualTo("RClassGenerator");
List<String> args = compilerAction.getArguments();
assertThat(args)
- .containsAllOf("--primaryRTxt", "--primaryManifest", "--libraries", "--classJarOutput",
+ .containsAllOf("--primaryRTxt", "--primaryManifest", "--library", "--classJarOutput",
"--packageForR", "com.binary.custom");
}