public void TestEncodeRune() { var result = new byte [10]; Utf8.EncodeRune(0x10000, result); foreach (var rm in runeMap) { var n = Utf8.EncodeRune(rm.Rune, result); for (int i = 0; i < rm.Bytes.Length; i++) { Assert.AreEqual(rm.Bytes [i], result [i], "Failure with rune {0} (0x{0:x}) at index {1}", rm.Rune, i); } } }