diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-26 15:41:06 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-26 15:59:29 +0000 |
commit | 237fe9d1d62d215721f120f5ec6399fc1456119a (patch) | |
tree | 64fd0aacaeb15a97b917490277c6e9e5e8bd79cf /searchlib/src/tests/util/rawbuf_test.cpp | |
parent | 972de79bfeebf0d9f78a28067969494536d65ca5 (diff) |
- assert result of Close() in destructor of FastOS_File and FastOS_BufferedFile.
- Check result of Close()
- Check result of Sync()
- Scope FastOS_File to avoid explicit Close().
- NULL -> nullptr
Diffstat (limited to 'searchlib/src/tests/util/rawbuf_test.cpp')
-rw-r--r-- | searchlib/src/tests/util/rawbuf_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/tests/util/rawbuf_test.cpp b/searchlib/src/tests/util/rawbuf_test.cpp index e24314336af..1963833947f 100644 --- a/searchlib/src/tests/util/rawbuf_test.cpp +++ b/searchlib/src/tests/util/rawbuf_test.cpp @@ -129,7 +129,7 @@ TEST("require that rawbuf can read from file") { buf.readFile(file, 100); EXPECT_EQUAL("foobarbaz", getString(buf)); - file.Close(); + ASSERT_TRUE(file.Close()); file.Delete(); } |