Example #1
0
        private static UAUnicodeChar CreateUAUnicodeCharFromXmlNode(XmlNode UAUnicodeCharTag)
        {
            XmlAttributeCollection a   = UAUnicodeCharTag.Attributes;
            UAUnicodeChar          chr = new UAUnicodeChar(a["Name"].Value, UInt32.Parse(a["CodePoint"].Value, System.Globalization.NumberStyles.AllowHexSpecifier));

            return(chr);
        }
Example #2
0
 public static string CreateRegexFromChar(UAUnicodeChar c)
 {
     return(UnicodeTestCase.CreateRegexFromList(new List <UAUnicodeChar>()
     {
         c
     }));
 }
Example #3
0
 public UnicodeTestCase(UnicodeTestCaseTypes type, UAUnicodeChar target, UAUnicodeChar source, string description)
 {
     this.type = type;
     this.target = target;
     this.sourcePoint = source;
     this.enabled = true;
     this.description = description;
 }
Example #4
0
 public UnicodeTestCase(UnicodeTestCaseTypes type, UAUnicodeChar target, UAUnicodeChar source, string description)
 {
     this.type        = type;
     this.target      = target;
     this.sourcePoint = source;
     this.enabled     = true;
     this.description = description;
 }
Example #5
0
        private static UnicodeTestCase ParseTraditional(XmlNode UAUnicodeCharMappingRootXmlNode)
        {
            // UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild);
            UAUnicodeChar target = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild);
            UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.FirstChild);
            // string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.InnerText;
            string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling.InnerText;

            return(new UnicodeTestCase(UnicodeTestCaseTypes.Traditional, target, source, description.Trim(XmlMappingLoader.TrimChars)));
        }
Example #6
0
        private static UnicodeTestCase ParseTransformable(XmlNode UAUnicodeCharMappingRootXmlNode)
        {
            UAUnicodeChar target = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.FirstChild);
            UAUnicodeChar source = CreateUAUnicodeCharFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.FirstChild);
            //Transformation
            //Transformation t = GetTransformationFromXmlNode(UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling);
            string description = UAUnicodeCharMappingRootXmlNode.FirstChild.NextSibling.NextSibling.NextSibling.InnerText;

            return(new UnicodeTestCase(UnicodeTestCaseTypes.Transformable, target, source, description.Trim(XmlMappingLoader.TrimChars)));
        }
Example #7
0
 public static string CreateRegexFromChar(UAUnicodeChar c)
 {
     return UnicodeTestCase.CreateRegexFromList(new List<UAUnicodeChar>() { c });
 }
Example #8
0
 private static UAUnicodeChar CreateUAUnicodeCharFromXmlNode(XmlNode UAUnicodeCharTag)
 {
     XmlAttributeCollection a = UAUnicodeCharTag.Attributes;
     UAUnicodeChar chr = new UAUnicodeChar(a["Name"].Value, UInt32.Parse(a["CodePoint"].Value, System.Globalization.NumberStyles.AllowHexSpecifier));
     return chr;
 }