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 IsCorrectProblem026()
        {
            var problem = new Problem026();

            Assert.Equal(Answers["26"], problem.Solve());
        }
Esempio n. 3
0
        public void SolveTest(uint n, string expected)
        {
            string solution = Problem026.Solve(n);

            Assert.AreEqual(expected, solution);
        }