|
|
1.1 root 1: /* Random regression tests etc. */
2:
3: #include <fstream.h>
4: #include <stdio.h>
5: #include <strstream.h>
6:
7: #define BUF_SIZE 4096
8:
9: void
10: test1 ()
11: {
12: fstream f;
13: char buf[BUF_SIZE];
14:
15: f.setbuf( buf, BUF_SIZE );
16: }
17:
18: void
19: test2 ( )
20: {
21: char string[BUF_SIZE];
22: ostrstream s( string, BUF_SIZE );
23:
24: s << "Bla bla bla " << 55 << ' ' << 3.23 << '\0' << endl;
25: cout << "Test2: " << string << endl;
26: }
27:
28: int main( )
29: {
30: test1 ();
31: test2 ();
32: return 0;
33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.