13 references to TestRoundTripCompressedUint
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
ObjectSerializationTests.cs (13)
233
TestRoundTripCompressedUint
(0);
234
TestRoundTripCompressedUint
(0x01u);
235
TestRoundTripCompressedUint
(0x0123u); // unique bytes tests order
236
TestRoundTripCompressedUint
(0x012345u); // unique bytes tests order
237
TestRoundTripCompressedUint
(0x01234567u); // unique bytes tests order
238
TestRoundTripCompressedUint
(0x3Fu); // largest value packed in one byte
239
TestRoundTripCompressedUint
(0x3FFFu); // largest value packed into two bytes
240
TestRoundTripCompressedUint
(0x3FFFFFu); // no three byte option yet, but test anyway
241
TestRoundTripCompressedUint
(0x3FFFFFFFu); // largest unit allowed in four bytes
243
Assert.Throws<ArgumentException>(() =>
TestRoundTripCompressedUint
(uint.MaxValue)); // max uint not allowed
244
Assert.Throws<ArgumentException>(() =>
TestRoundTripCompressedUint
(0x80000000u)); // highest bit set not allowed
245
Assert.Throws<ArgumentException>(() =>
TestRoundTripCompressedUint
(0x40000000u)); // second highest bit set not allowed
246
Assert.Throws<ArgumentException>(() =>
TestRoundTripCompressedUint
(0xC0000000u)); // both high bits set not allowed