1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/libs/mangle/stream/tests/file_server_test.cpp

19 lines
428 B
C++
Raw Normal View History

2010-06-03 20:13:27 +02:00
#include "../servers/file_stream.hpp"
2010-01-01 16:39:11 +01:00
#include <iostream>
using namespace Mangle::Stream;
using namespace std;
int main()
{
StreamPtr inp(new FileStream("file_server_test.cpp"));
char buf[21];
buf[20] = 0;
cout << "pos=" << inp->tell() << " eof=" << inp->eof() << endl;
inp->read(buf, 20);
cout << "First 20 bytes: " << buf << endl;
cout << "pos=" << inp->tell() << " eof=" << inp->eof() << endl;
return 0;
}