Esempio n. 1
0
    public void Run()
    {
        var bruteForce = new BruteForceSolver();
        var fast       = new FastSolver();

        for (var n = 3; n < 10; n++)
        {
            foreach (var ps in Quiz.AllPropositions(n))
            {
                var s        = new string(ps);
                var expected = bruteForce.Solve(n, s);
                var actual   = fast.Solve(n, s);
                if (expected != actual)
                {
                    System.Diagnostics.Debug.Assert(false);
                }
            }
        }
    }