Exemple #1
0
Assert123(
    IStream< int > s
)
{
    IMaybe< int > t;

    t = s.TryPull();
    Assert( t.A );
    Assert( t.B == 1 );

    t = s.TryPull();
    Assert( t.A );
    Assert( t.B == 2 );

    t = s.TryPull();
    Assert( t.A );
    Assert( t.B == 3 );

    t = s.TryPull();
    Assert( !t.A );
}