Esempio n. 1
0
        public void PerformanceTest()
        {
            uint      sum       = 2112532500u;
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            string solution1 = Problem026.Solve(sum);

            stopwatch.Stop();
            Console.WriteLine(stopwatch.Elapsed);

            stopwatch.Restart();
            string solution2 = Problem026.ClearlySolve(sum);

            stopwatch.Stop();
            Console.WriteLine(stopwatch.Elapsed);

            Assert.AreEqual(solution1, solution2);
            Console.WriteLine(solution1);
        }
Esempio n. 2
0
        public void CleverSolveTest(uint sum, string expected)
        {
            string solution = Problem026.ClearlySolve(sum);

            Assert.AreEqual(expected, solution);
        }