/// <summary> /// 测试类 /// </summary> /// <param name="args"></param> static void Main(string[] args) { //Console.WriteLine("hello world"); EsayTest.Start(); MediumTest.Start(); HardTest.Start(); Console.ReadKey(); }
public static string FixedSortingTest(string str) { return(MediumTest.Sorting(str)); }
public static string LandscapeType(int[] arr) { Console.WriteLine($"Input: {arr}"); return(MediumTest.LandscapeType(arr)); }
public static string TextToNumberBinary(string str) { Console.WriteLine($"Input: {str}"); return(MediumTest.TextToNumberBinary(str)); }
public static bool SameLetterPattern(string str1, string str2) { Console.WriteLine($"Input: {str1}, {str2}"); return(MediumTest.SameLetterPattern(str1, str2)); }
//[Test] //[TestCase("A B C.", ExpectedResult = 1.00)] //[TestCase("What a gorgeous day.", ExpectedResult = 4.00)] //[TestCase("Dude, this is so awesome!", ExpectedResult = 3.80)] //[TestCase("Working on my tan right now.", ExpectedResult = 3.67)] //[TestCase("Having a blast partying in Las Vegas.", ExpectedResult = 4.29)] //[TestCase("Have you ever wondered what Saturn looks like?", ExpectedResult = 4.75)] //[TestCase("I just planted a young oak tree, wonder how tall it will grow in a few years?", ExpectedResult = 3.47)] public static double AverageWordLength(string str) { Console.WriteLine($"Input: {str}"); return(MediumTest.AverageWordLength(str)); }
public static int MinTurns(string current, string target) { Console.WriteLine($"Input: {current}, {target}"); return(MediumTest.MinTurns(current, target)); }
public static bool IsAnagram(string current, string target) { Console.WriteLine($"Input: {current}, {target}"); return(MediumTest.AnagramStrStr(current, target)); }
public static bool FixedTest(string password) { return(MediumTest.ValidatePassword(password)); }