| 843 | } |
| 844 | |
| 845 | void TestOpenOutputStreamDestructor() { |
| 846 | std::shared_ptr<io::OutputStream> stream; |
| 847 | ASSERT_OK_AND_ASSIGN(stream, fs_->OpenOutputStream("bucket/somefile")); |
| 848 | ASSERT_OK(stream->Write("new data")); |
| 849 | // Destructor implicitly closes stream and completes the multipart upload. |
| 850 | stream.reset(); |
| 851 | AssertObjectContents(client_.get(), "bucket", "somefile", "new data"); |
| 852 | } |
| 853 | |
| 854 | void TestOpenOutputStreamCloseAsyncDestructor() { |
| 855 | std::shared_ptr<io::OutputStream> stream; |
no test coverage detected