wibble  0.1.28
posix.test.h
Go to the documentation of this file.
1 /* -*- C++ -*- (c) 2008 Petr Rockai <me@mornfall.net>
2  (c) 2008 Enrico Zini <enrico@enricozini.org> */
3 
4 #include <wibble/test.h>
5 #include <wibble/stream/posix.h>
6 #include <sys/types.h>
7 #include <sys/stat.h>
8 #include <fcntl.h>
9 
10 namespace {
11 
12 using namespace std;
13 using namespace wibble;
14 using namespace wibble::stream;
15 
16 struct TestStreamPosix {
17 
18  Test basicMatch() {
19  int fd = open("/dev/null", O_WRONLY);
20  assert(fd != -1);
21 
22  PosixBuf buf(fd);
23  ostream os(&buf);
24 
25  os << "Foo";
26  os << "Bar";
27  os << endl;
28  }
29 
30 };
31 
32 }
33 
34 // vim:set ts=4 sw=4: