Beispiel #1
0
 public void EntityDifferPatcherTests(IEnumerable <Fuzzer.CommandData <DifferPatcherFuzzer> > commands)
 {
     using (var fuzzer = new DifferPatcherFuzzer())
     {
         fuzzer.Run(commands, str => Console.WriteLine(str.ToCSharpString()));
     }
 }
Beispiel #2
0
 public void EntityDifferPatcherFuzzer([ValueSource(nameof(FuzzTestingSeeds))]
                                       uint seed)
 {
     using (var fuzzer = new DifferPatcherFuzzer())
     {
         var commands = fuzzer.GenerateCommands(DifferPatcherFuzzer.WeightedGenerators, seed, 200, 20);
         fuzzer.Run(commands, str => Console.WriteLine(str.ToCSharpString()));
     }
 }
Beispiel #3
0
        public void ReduceTestCase()
        {
            int lastIndex  = TestCases.Length - 1;
            var commands   = Fuzzer.ParseLog(DifferPatcherFuzzer.Generators, TestCases[lastIndex].Item2.Split('\n')).ToList();
            var simplified = Fuzzer.Reduce(() => new DifferPatcherFuzzer(), commands);

            Debug.Log($"Simplified from {commands.Count} to {simplified.Count} commands:\n" + string.Join("\n", simplified.Select(c => c.ToCSharpString())));
            using (var fuzzer = new DifferPatcherFuzzer())
            {
                fuzzer.Run(simplified, str => Console.WriteLine(str.ToCSharpString()));
            }
        }