Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3675

Show
Ignore:
Timestamp:
06/26/08 20:47:32 (4 months ago)
Author:
kris
Message:

added a main() with test case

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/io/stream/DataStream.d

    r3661 r3675  
    337337        } 
    338338} 
     339 
     340 
     341/******************************************************************************* 
     342 
     343*******************************************************************************/ 
     344 
     345debug (DataStream) 
     346{ 
     347        import tango.io.Buffer; 
     348 
     349        void main() 
     350        { 
     351                auto buf = new Buffer(32); 
     352 
     353                auto output = new DataOutput (buf); 
     354                output.put ("blah blah"); 
     355                output.putInt (1024); 
     356 
     357                auto input = new DataInput (buf); 
     358                assert (input.get(new char[9]) is 9); 
     359                assert (input.getInt is 1024); 
     360                input.getInt; 
     361        } 
     362}