summaryrefslogtreecommitdiff
path: root/tools/aapt2/io/FileStream_test.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-11-03 15:20:17 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-11-07 11:21:10 -0800
commit93190b79d11d874199cfe7258526a48cfc8399fc (patch)
tree3a7ae2b44c7f9693d54cdb0849e21338398de3d3 /tools/aapt2/io/FileStream_test.cpp
parentb54be8de65b09c85992b30dbb1d52032f0498b6d (diff)
AAPT2: Better debugging output
Test: make aapt2_tests Change-Id: I7778b773201381538dc1f2e376abee4eb33e44c0
Diffstat (limited to 'tools/aapt2/io/FileStream_test.cpp')
-rw-r--r--tools/aapt2/io/FileStream_test.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/aapt2/io/FileStream_test.cpp b/tools/aapt2/io/FileStream_test.cpp
index 68c3cb1f4156..a6d58caa07b7 100644
--- a/tools/aapt2/io/FileStream_test.cpp
+++ b/tools/aapt2/io/FileStream_test.cpp
@@ -87,10 +87,8 @@ TEST(FileOutputStreamTest, NextAndBackup) {
const std::string input = "this is a cool string";
TemporaryFile file;
- int fd = file.release();
- // FileOutputStream takes ownership.
- FileOutputStream out(fd, 10u);
+ FileOutputStream out(file.fd, 10u);
ASSERT_FALSE(out.HadError());
EXPECT_THAT(out.ByteCount(), Eq(0u));
@@ -118,10 +116,10 @@ TEST(FileOutputStreamTest, NextAndBackup) {
ASSERT_TRUE(out.Flush());
- lseek64(fd, 0, SEEK_SET);
+ lseek64(file.fd, 0, SEEK_SET);
std::string actual;
- ASSERT_TRUE(android::base::ReadFdToString(fd, &actual));
+ ASSERT_TRUE(android::base::ReadFdToString(file.fd, &actual));
EXPECT_THAT(actual, StrEq(input));
}