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