示例#1
0
        public void ToQueryForms_Test(string input, IEnumerable <string> expected)
        {
            var result    = Pinyin.ToQueryForms(input);
            var common    = expected.Intersect(result);
            var incorrect = result.Except(common).ToList();

            incorrect.AddRange(common.Except(result).ToList());
            Assert.IsTrue(incorrect.Count == 0);
        }
示例#2
0
 public void Regex_Test()
 {
     Pinyin.ToQueryForms("qing qinglü4 lü4qing1 qinglü");
     Pinyin.ToQueryForms("chuangzaouerang");
     Pinyin.ToQueryForms("xi'an");
     Pinyin.ToQueryForms("");
     Pinyin.ToQueryForms("中文");
     Pinyin.ToQueryForms("abbbbbb");
 }
示例#3
0
 public void ToQueryForms_Combinations()
 {
     Pinyin.ToQueryForms("lu2 zhuang3nv LU:an");
 }