#include "file_system_test.h"
Protected Member Functions | |
void | CheckDoesNotExist (const GoogleString &filename) |
void | CheckRead (const GoogleString &filename, const GoogleString &expected_contents) |
virtual void | DeleteRecursively (const StringPiece &filename)=0 |
virtual FileSystem * | file_system ()=0 |
Provide a pointer to your favorite filesystem implementation. | |
virtual Timer * | timer ()=0 |
Pointer to a timer to use in tests. | |
virtual GoogleString | test_tmpdir ()=0 |
Provide a temporary directory for tests to put files in. | |
GoogleString | WriteNewFile (const StringPiece &suffix, const GoogleString &content) |
void | TestWriteRead () |
void | TestTemp () |
void | TestRename () |
void | TestRemove () |
void | TestExists () |
void | TestCreateFileInDir () |
void | TestMakeDir () |
void | TestIsDir () |
void | TestRecursivelyMakeDir () |
void | TestRecursivelyMakeDir_NoPermission () |
void | TestRecursivelyMakeDir_FileInPath () |
void | TestListContents () |
void | TestAtime () |
void | TestMtime () |
void | TestSize () |
void | TestLock () |
void | TestLockTimeout () |
Protected Attributes | |
GoogleMessageHandler | handler_ |
Base class for testing a FileSystem implementation. Subclasses must implement DeleteRecursively and GetFileSystem, then should create their own tests calling each of our Test* methods.
virtual void net_instaweb::FileSystemTest::DeleteRecursively | ( | const StringPiece & | filename | ) | [protected, pure virtual] |
Delete (at least) the named file or directory and everything underneath it. The test is permitted to delete more things (up to and including the entire file system).
void net_instaweb::FileSystemTest::TestWriteRead | ( | ) | [protected] |
All FileSystem implementations should run the following tests. Note: If you add a test below, please add invocations in: AprFileSystemTest, StdioFileSystemTest, MemFileSystemTest.