Пример #1
0
 public void Should_read_and_write_doubles()
 {
     var buffer = new byte[1024];
     using (var wrapper = new UnsafeBufferWrapper(buffer))
     {
         const double value = 42.42;
         wrapper.Write(value);
         Assert.AreEqual(wrapper.Position, sizeof (double));
         wrapper.ResetCursor();
         var readValue = wrapper.ReadDouble();
         Assert.AreEqual(value, readValue);
     }
 }