source: cppstreams/test_override.cc @ 2

Last change on this file since 2 was 2, checked in by gobi, 13 years ago

import

File size: 367 bytes
Line 
1#include "stream.h"
2#include "test_common.h"
3
4extern stream<double> s2;
5stream<double> s1(1.0<<=s2),s2(.0<<=s1);
6
7stream<int> s3 = 1<<=s3;
8stream<int> s4 = s3+s3;
9stream<int> s5 = s3+s5;
10stream<int> s6 = s6+s3;
11stream<int> pm = 1<<=(-pm);
12
13int main()
14{
15    compare(s1, {1., 0.});
16    compare(s2, {0., 1.});
17    compare(s3, {1});
18    compare(pm, {1,-1});
19        return 0;
20}
Note: See TracBrowser for help on using the repository browser.