diff options
author | 2017-05-03 19:36:38 +0200 | |
---|---|---|
committer | 2017-05-04 13:13:25 +0200 | |
commit | 3c87960ba24397f0e155691bfae2e4cea1d03cfb (patch) | |
tree | 19b23e3c1429f117b1d8ad9d3a3cd9f341e48e7a /src/test | |
parent | a6ad2d5564ad8ce7c7ebd0ba093db578cf5ae3cf (diff) |
* Fork the deprecated SymbolLoader/SymbolWriter code from com.android.builder.internal
* Fixed formatting.
RELNOTES: None
PiperOrigin-RevId: 154973113
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/android/resources/RClassGeneratorTest.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/test/java/com/google/devtools/build/android/resources/RClassGeneratorTest.java b/src/test/java/com/google/devtools/build/android/resources/RClassGeneratorTest.java index e556dd4d72..93f3854618 100644 --- a/src/test/java/com/google/devtools/build/android/resources/RClassGeneratorTest.java +++ b/src/test/java/com/google/devtools/build/android/resources/RClassGeneratorTest.java @@ -15,8 +15,6 @@ package com.google.devtools.build.android.resources; import static com.google.common.truth.Truth.assertThat; -import com.android.utils.ILogger; -import com.android.utils.StdLogger; import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; @@ -48,14 +46,12 @@ import org.junit.runners.JUnit4; public class RClassGeneratorTest { private Path temp; - private ILogger stdLogger; @Rule public final ExpectedException thrown = ExpectedException.none(); @Before public void setUp() throws Exception { temp = Files.createTempDirectory(toString()); - stdLogger = new StdLogger(StdLogger.Level.VERBOSE); } @Test @@ -154,12 +150,10 @@ public class RClassGeneratorTest { // is a bug in aapt, or R.txt is manually written the wrong way. ResourceSymbols symbolValues = createSymbolFile("R.txt", "int[] styleable ActionMenuView { 1, }"); - ResourceSymbols symbolsInLibrary = symbolValues; Path out = temp.resolve("classes"); Files.createDirectories(out); thrown.expect(NumberFormatException.class); - RClassGenerator writer = RClassGenerator.fromSymbols(out, symbolValues, finalFields); - writer.write("com.foo", symbolsInLibrary.asFilterMap()); + RClassGenerator.fromSymbols(out, symbolValues, finalFields); } @Test @@ -167,12 +161,10 @@ public class RClassGeneratorTest { boolean finalFields = true; ResourceSymbols symbolValues = createSymbolFile("R.txt", "int[] styleable ActionMenuView { 1, , 2 }"); - ResourceSymbols symbolsInLibrary = symbolValues; Path out = temp.resolve("classes"); Files.createDirectories(out); thrown.expect(NumberFormatException.class); - RClassGenerator writer = RClassGenerator.fromSymbols(out, symbolValues, finalFields); - writer.write("com.foo", symbolsInLibrary.asFilterMap()); + RClassGenerator.fromSymbols(out, symbolValues, finalFields); } @Test @@ -341,7 +333,7 @@ public class RClassGeneratorTest { throws IOException, InterruptedException, ExecutionException { Path path = createFile(name, contents); ListeningExecutorService executorService = MoreExecutors.newDirectExecutorService(); - ResourceSymbols symbolFile = ResourceSymbols.load(path, executorService, stdLogger).get(); + ResourceSymbols symbolFile = ResourceSymbols.load(path, executorService).get(); return symbolFile; } |