wibble
1.1
wibble
sys
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
15
Test
readlock
() {
16
#ifdef POSIX
17
Lockfile
lk1
(
"testlock"
,
false
);
18
#endif
19
}
20
21
Test
writelock
() {
22
#ifdef POSIX
23
Lockfile
lk1
(
"testlock"
,
true
);
24
#endif
25
}
26
};
27
28
// 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::SanitizeReturn
Definition
amorph.h:30
wibble::sys::fs::Lockfile
RAII lock file.
Definition
lockfile.h:18
test.h
Generated by
1.9.8