public void ShouldCreateUnicodeFunctionsFromParent()
 {
     using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
     {
         Assert.NotNull(unicodeFunctions.Parent);
     }
 }
        public void ShouldSetGeneralCategoryDelegate()
        {
            using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
            {
                unicodeFunctions.SetGeneralCategoryDelegate((f, u) => UnicodeGeneralCategory.Control);

                Assert.Equal(UnicodeGeneralCategory.Control, unicodeFunctions.GetGeneralCategory(0));
            }
        }
        public void ShouldSetCombiningClassDelegate()
        {
            using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
            {
                unicodeFunctions.SetCombiningClassDelegate((f, u) => UnicodeCombiningClass.Above);

                Assert.Equal(UnicodeCombiningClass.Above, unicodeFunctions.GetCombiningClass(0));
            }
        }
        public void ShouldSetMirroringDelegate()
        {
            using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
            {
                unicodeFunctions.SetMirroringDelegate((f, u) => 1337);

                Assert.Equal(1337u, unicodeFunctions.GetMirroring(0));
            }
        }
        public void ShouldSetComposeDelegate()
        {
            using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
            {
                unicodeFunctions.SetComposeDelegate((UnicodeFunctions f, uint a, uint b, out uint ab) =>
                {
                    ab = 1337;
                    return(true);
                });

                Assert.True(unicodeFunctions.TryCompose(1, 2, out var composed));

                Assert.Equal(1337u, composed);
            }
        }
        public void ShouldSetDecomposeDelegate()
        {
            using (var unicodeFunctions = new UnicodeFunctions(UnicodeFunctions.Default))
            {
                unicodeFunctions.SetDecomposeDelegate((UnicodeFunctions f, uint ab, out uint a, out uint b) =>
                {
                    a = 1337;
                    b = 7331;
                    return(true);
                });

                Assert.True(unicodeFunctions.TryDecompose(0, out var first, out var second));

                Assert.Equal(1337u, first);
                Assert.Equal(7331u, second);
            }
        }