Exemple #1
0
        public void CompareTo()
        {
            UCDCharacter ucd = new BidiCharacter("004F", "LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F;");

            Assert.AreEqual(0, ucd.CompareTo("L"));
            Assert.Greater(0, ucd.CompareTo("R"));
            Assert.Less(0, ucd.CompareTo("AL"));
        }
Exemple #2
0
 public void SetUp()
 {
     m_comparer = new UCDComparer();
     m_bidi     = new BidiCharacter("0669",
                                    "ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;;");
     m_pua = new PUACharacter("0669",
                              "ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;;");
 }
        public void UcdWithPua()
        {
            Assert.AreEqual(0, m_comparer.Compare(m_pua, m_bidi));
            Assert.AreEqual(0, m_comparer.Compare(m_bidi, m_pua));

            PUACharacter otherPua;

            otherPua = new PUACharacter("004F", "LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F;");
            Assert.Greater(m_comparer.Compare(m_bidi, otherPua), 0);

            BidiCharacter otherBidi;

            otherBidi = new BidiCharacter("004F", "LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F;");
            Assert.Greater(m_comparer.Compare(m_pua, otherBidi), 0);
        }
        public void UcdWithUcd()
        {
            BidiCharacter otherBidi = m_bidi;

            Assert.AreEqual(0, m_comparer.Compare(m_bidi, otherBidi));

            otherBidi = new BidiCharacter("0669",
                                          "ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;;");
            Assert.AreEqual(0, m_comparer.Compare(m_bidi, otherBidi));

            otherBidi = new BidiCharacter("004F", "LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F;");
            Assert.Less(m_comparer.Compare(m_bidi, otherBidi), 0);

            otherBidi = new BidiCharacter("0668",
                                          "ARABIC-INDIC DIGIT EIGHT;Nd;0;AN;;8;8;8;N;;;;;");
            Assert.Greater(m_comparer.Compare(m_bidi, otherBidi), 0);
        }