lockfile.test.h
Go to the documentation of this file.
/* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
(c) 2007 Enrico Zini <enrico@enricozini.org> */
#include <wibble/sys/lockfile.h>
#include <cstdlib>
#include <set>
#include <wibble/test.h>
using namespace std;
using namespace wibble::sys::fs;
struct TestLockfile {
// Cannot test the locks without forking, as reacquiring the lock from the
// same process is just an update of the previous lock
Test readlock() {
#ifdef POSIX
Lockfile lk1("testlock", false);
#endif
}
Test writelock() {
#ifdef POSIX
Lockfile lk1("testlock", true);
#endif
}
};
// vim:set ts=4 sw=4:
lockfile.h
wibble::sys::fs
Definition: fs.cpp:24
TestLockfile
Definition: lockfile.test.h:12
TestLockfile::readlock
Test readlock()
Definition: lockfile.test.h:15
TestLockfile::writelock
Test writelock()
Definition: lockfile.test.h:21
wibble::sys::fs::Lockfile
RAII lock file.
Definition: lockfile.h:18
test.h
Test
void Test
Definition: test.h:178