public void TestUInt32() { UInt32 v = 1; for (var i = 0; i < (sizeof(UInt32) * 8) - 1; i++) { v = v.RolCopy(); var a = (UInt32)((UInt32)1 << (i + 1)); _output?.WriteLine(Convert.ToString(a, 2).PadLeft(32, '0') + " == " + Convert.ToString(v, 2).PadLeft(32, '0')); Assert.Equal(a, v); } v = v.RolCopy(); _output?.WriteLine(Convert.ToString(1, 2).PadLeft(32, '0') + " == " + Convert.ToString((UInt32)((UInt32)v), 2).PadLeft(32, '0')); Assert.Equal((UInt32)1, (UInt32)(UInt32)v); }