| OLD | NEW |
| 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "volume_archive_libarchive.h" | 5 #include "volume_archive_libarchive.h" |
| 6 | 6 |
| 7 #include "fake_lib_archive.h" | 7 #include "fake_lib_archive.h" |
| 8 #include "fake_volume_reader.h" | 8 #include "fake_volume_reader.h" |
| 9 #include "testing/gtest/gtest.h" | 9 #include "testing/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 TEST_F(VolumeArchiveLibarchiveTest, CleanupAfterInitFailure) { | 245 TEST_F(VolumeArchiveLibarchiveTest, CleanupAfterInitFailure) { |
| 246 EXPECT_TRUE(volume_archive->reader() != NULL); | 246 EXPECT_TRUE(volume_archive->reader() != NULL); |
| 247 | 247 |
| 248 fake_lib_archive_config::fail_archive_read_open = true; | 248 fake_lib_archive_config::fail_archive_read_open = true; |
| 249 EXPECT_TRUE(!volume_archive->Init(kEncoding)); | 249 EXPECT_TRUE(!volume_archive->Init(kEncoding)); |
| 250 | 250 |
| 251 // Test Cleanup after Init failure. | 251 // Test Cleanup after Init failure. |
| 252 EXPECT_TRUE(volume_archive->Cleanup()); | 252 EXPECT_TRUE(volume_archive->Cleanup()); |
| 253 EXPECT_EQ(NULL, volume_archive->reader()); | 253 EXPECT_EQ(NULL, volume_archive->reader()); |
| 254 } | 254 } |
| OLD | NEW |