test-fs.cc File Reference

#include "config.h"
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include "asserts.h"
#include "error.h"
#include "fs.h"
#include "test-fs-cwd.h"

Include dependency graph for test-fs.cc:

Go to the source code of this file.

Defines

#define TRY_COMMAND(code)

Functions

void create_file (const std::string &pathname, uint32 size)
void cleanup (void)
void test_cwd (void)
void test_reform_path (void)
void test_permute_path (void)
void test_exists (void)
void test_readable (void)
void test_writable (void)
void test_executable (void)
void test_mk_dir (void)
void test_rm_dir (void)
void test_rm_file (void)
void test_mk_dirhier (void)
void test_filestatus (void)
void test_mk_symlink (void)
void test_mk_relative_symlink (void)
const subdirectory test_subdirectory_sub (void)
void test_subdirectory (void)
void test_directory (void)
void test_rm_recursive (void)
void test_mk_relative_path (void)
void test_filesystem (void)
void test_simple_lock (void)
int main (int argc, char *argv[])


Define Documentation

#define TRY_COMMAND ( code   ) 

Value:

thrown = false; \
        try { \
                code; \
        } \
        catch(...) { \
                thrown = true; \
        }

Definition at line 14 of file test-fs.cc.

Referenced by test_directory(), test_filestatus(), test_mk_dir(), test_mk_dirhier(), test_mk_relative_symlink(), test_mk_symlink(), test_rm_dir(), test_rm_file(), test_rm_recursive(), and test_subdirectory().


Function Documentation

void cleanup ( void   ) 

Definition at line 63 of file test-fs.cc.

Referenced by main().

void create_file ( const std::string &  pathname,
uint32  size 
)

Definition at line 23 of file test-fs.cc.

References ERROR.

Referenced by test_filestatus(), and test_rm_file().

int main ( int  argc,
char *  argv[] 
)

Definition at line 502 of file test-fs.cc.

References cleanup(), err_unknown, test_cwd(), test_directory(), test_executable(), test_exists(), test_filestatus(), test_filesystem(), test_mk_dir(), test_mk_dirhier(), test_mk_relative_path(), test_mk_relative_symlink(), test_mk_symlink(), test_permute_path(), test_readable(), test_reform_path(), test_rm_dir(), test_rm_file(), test_rm_recursive(), test_simple_lock(), test_subdirectory(), and test_writable().

Here is the call graph for this function:

void test_cwd ( void   ) 

Definition at line 71 of file test-fs.cc.

References check_cwd, and cwd().

Referenced by main().

Here is the call graph for this function:

void test_directory ( void   ) 

Definition at line 322 of file test-fs.cc.

References directory::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_executable ( void   ) 

Definition at line 116 of file test-fs.cc.

References executable(), and exists().

Referenced by main().

Here is the call graph for this function:

void test_exists ( void   ) 

Definition at line 100 of file test-fs.cc.

References exists().

Referenced by main().

Here is the call graph for this function:

void test_filestatus ( void   ) 

Definition at line 177 of file test-fs.cc.

References create_file(), exists(), filestatus::path(), filestatus::size(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_filesystem ( void   ) 

Definition at line 405 of file test-fs.cc.

References cwd(), and filesystem::path().

Referenced by main().

Here is the call graph for this function:

void test_mk_dir ( void   ) 

Definition at line 122 of file test-fs.cc.

References exists(), mk_dir(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_dirhier ( void   ) 

Definition at line 160 of file test-fs.cc.

References exists(), mk_dirhier(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_relative_path ( void   ) 

Definition at line 366 of file test-fs.cc.

References mk_relative_path().

Referenced by main().

Here is the call graph for this function:

void test_mk_relative_symlink ( void   ) 

Definition at line 231 of file test-fs.cc.

References exists(), filestatus::link(), mk_relative_symlink(), filestatus::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_symlink ( void   ) 

Definition at line 214 of file test-fs.cc.

References exists(), filestatus::link(), mk_symlink(), filestatus::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_permute_path ( void   ) 

Definition at line 88 of file test-fs.cc.

References permute_path().

Referenced by main().

Here is the call graph for this function:

void test_readable ( void   ) 

Definition at line 106 of file test-fs.cc.

References readable().

Referenced by main().

Here is the call graph for this function:

void test_reform_path ( void   ) 

Definition at line 76 of file test-fs.cc.

References reform_path().

Referenced by main().

Here is the call graph for this function:

void test_rm_dir ( void   ) 

Definition at line 132 of file test-fs.cc.

References exists(), rm_dir(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_rm_file ( void   ) 

Definition at line 142 of file test-fs.cc.

References create_file(), exists(), mk_dir(), rm_dir(), rm_file(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_rm_recursive ( void   ) 

Definition at line 357 of file test-fs.cc.

References exists(), rm_recursive(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_simple_lock ( void   ) 

Definition at line 412 of file test-fs.cc.

References exists(), simple_lock::is_locked(), simple_lock::lock(), simple_lock::locked_by(), simple_lock::lockfile(), mk_dir(), pid(), and simple_lock::unlock().

Referenced by main().

Here is the call graph for this function:

void test_subdirectory ( void   ) 

Definition at line 280 of file test-fs.cc.

References subdirectory::path(), test_subdirectory_sub(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

const subdirectory test_subdirectory_sub ( void   ) 

Definition at line 272 of file test-fs.cc.

References subdirectory::path().

Referenced by test_subdirectory().

Here is the call graph for this function:

void test_writable ( void   ) 

Definition at line 111 of file test-fs.cc.

References writable().

Referenced by main().

Here is the call graph for this function:


Generated on Tue Jul 1 12:10:04 2008 for rvm by  doxygen 1.5.1