Esempio n. 1
0
            public void _1_1_9_Test()
            {
                var n        = 9;
                var testable = new _1_1_9();

                var arr = Enumerable.Range(0, n + 1).Select(x => (int?)null).ToList();

                var f = testable.Run(n);
                //var fr = testable.Rec(n, arr);
                var fr = testable.Rec1(n, 0, 0, 0);

                Assert.That(f == fr && f == 34);
            }
Esempio n. 2
0
            public void _1_1_9_AnyInputValues_Success()
            {
                var testable = new _1_1_9();

                Prop.ForAll(
                    Arb.From <int>().Filter(x => x > 0 && x < Math.Pow(10, 5)),
                    n =>
                {
                    var arr = Enumerable.Range(0, n + 1).Select(x => (int?)null).ToList();
                    var f   = testable.Run(n);
                    //var fr = testable.Rec(n, arr);
                    var fr = testable.Rec1(n, 0, 0, 0);

                    Assert.That(f == fr);
                }).QuickCheckThrowOnFailure();
            }