wibble 0.1.28
|
00001 /* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net> 00002 (c) 2007 Enrico Zini <enrico@enricozini.org> */ 00003 #include <wibble/sys/lockfile.h> 00004 #include <cstdlib> 00005 #include <set> 00006 00007 #include <wibble/test.h> 00008 00009 using namespace std; 00010 using namespace wibble::sys::fs; 00011 00012 struct TestLockfile { 00013 // Cannot test the locks without forking, as reacquiring the lock from the 00014 // same process is just an update of the previous lock 00015 Test readlock() { 00016 Lockfile lk1("testlock", false); 00017 } 00018 00019 Test writelock() { 00020 Lockfile lk1("testlock", true); 00021 } 00022 }; 00023 00024 // vim:set ts=4 sw=4: