Go back to getting the test expectation string using Files.toString.

The art test that is failing on the bots has a newline char that
was lost.

R=zerny@google.com

Change-Id: I224550d70d15574ec0b62983d97c514baa4adf75
diff --git a/src/test/java/com/android/tools/r8/R8RunArtTestsTest.java b/src/test/java/com/android/tools/r8/R8RunArtTestsTest.java
index afe5e55..5c5975c 100644
--- a/src/test/java/com/android/tools/r8/R8RunArtTestsTest.java
+++ b/src/test/java/com/android/tools/r8/R8RunArtTestsTest.java
@@ -942,9 +942,11 @@
   }
 
   private void executeCompilerUnderTest(
-      CompilerUnderTest compilerUnderTest, Collection<String> fileNames, String resultPath,
-      CompilationMode compilationMode // use null for default
-  ) throws IOException, ProguardRuleParserException, ExecutionException, CompilationException {
+      CompilerUnderTest compilerUnderTest,
+      Collection<String> fileNames,
+      String resultPath,
+      CompilationMode compilationMode)
+      throws IOException, ProguardRuleParserException, ExecutionException, CompilationException {
     executeCompilerUnderTest(compilerUnderTest, fileNames, resultPath, compilationMode, null);
   }
 
@@ -1318,7 +1320,7 @@
       }
 
       File expectedFile = specification.resolveFile("expected.txt");
-      String expected = String.join("\n", FileUtils.readTextFile(expectedFile.toPath()));
+      String expected = com.google.common.io.Files.toString(expectedFile, Charsets.UTF_8);
       if (specification.failsWithArt) {
         thrown.expect(AssertionError.class);
       }
diff --git a/src/test/java/com/android/tools/r8/TestCondition.java b/src/test/java/com/android/tools/r8/TestCondition.java
index 8cf5bd8..5ffd779 100644
--- a/src/test/java/com/android/tools/r8/TestCondition.java
+++ b/src/test/java/com/android/tools/r8/TestCondition.java
@@ -109,8 +109,8 @@
   }
 
   public boolean test(DexTool dexTool, CompilerUnderTest compilerUnderTest, DexVm dexVm) {
-    // R8DEBUG_AFTER_D8 will be set in the R8 phase of the D8-then-R8 tests. So D8_R8DEBUG must
-    // match both with plain R8 and itself.
+    // R8DEBUG_AFTER_D8 will be set in the R8 phase of the D8-then-R8 tests. So R8DEBUG_AFTER_D8
+    // must match both with plain R8 and itself.
     boolean compilerMatches = compilers.contains(compilerUnderTest)
         || (compilerUnderTest == CompilerUnderTest.R8DEBUG_AFTER_D8
             && compilers.contains(CompilerUnderTest.R8));