wibble 1.1
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>
6#include <sys/types.h>
7#include <sys/stat.h>
8#include <fcntl.h>
9
10namespace {
11
12using namespace std;
13using namespace wibble;
14using namespace wibble::stream;
15
16struct TestStreamPosix {
17
19#ifdef POSIX // no /dev/null otherwise
20 int fd = open("/dev/null", O_WRONLY);
21 assert(fd != -1);
22
23 PosixBuf buf(fd);
24 ostream os(&buf);
25
26 os << "Foo";
27 os << "Bar";
28 os << endl;
29#endif
30 }
31
32};
33
34}
35
36// vim:set ts=4 sw=4:
Definition posix.h:16
Definition posix.h:13
Definition amorph.h:17
Definition amorph.h:30
#define assert(x)
Definition test.h:30