示例#1
0
        public void TestStackOverflow()
        {
            Zen <int> x = Language.Arbitrary <int>();
            Zen <int> y = Language.Arbitrary <int>();

            for (int i = 0; i < 20000; i++)
            {
                y = Language.If(x >= i, i, y);
            }

            y.Simplify();
        }
示例#2
0
        public void TestStackOverflow()
        {
            Settings.UseLargeStack = true;
            Zen <int> x = Language.Arbitrary <int>();
            Zen <int> y = Language.Arbitrary <int>();

            for (int i = 0; i < 20000; i++)
            {
                y = Language.If(x >= i, i, y);
            }

            y.Simplify();
            Settings.UseLargeStack = false;
        }
示例#3
0
 /// <summary>
 /// Creates an arbitrary value if the input is null.
 /// </summary>
 /// <param name="input">The input.</param>
 /// <param name="listSize">The list size.</param>
 /// <param name="checkSmallerLists">Whether to check smaller lists.</param>
 /// <returns>An arbitrary Zen value.</returns>
 public static Zen <T> GetArbitraryIfNull <T>(Zen <T> input, int listSize, bool checkSmallerLists)
 {
     return((input is null) ? Language.Arbitrary <T>(listSize, checkSmallerLists) : input);
 }