Пример #1
0
        public override void StartMethod(Method method)
        {
            base.StartMethod(method);
            this.skipCurrentMethod = false;
            expectedOutcomes       = MethodRegressionOutcomes.GetOutcomes(method, this.mdDecoder);

            int count;

            // It's the first time we saw the method?
            if (!this.methodAnalysisCount.TryGetValue(method, out count))
            {
                count = MethodRegressionOutcomes.GetReanalyisCountIfAny(method, this.mdDecoder);
            }
            else
            {
                count--; // we are re-analyzing the method
            }

            if (count > 0)
            {
                this.skipCurrentMethod = true;
            }

            this.methodAnalysisCount[method] = count;
            this.currentMethod = method;
        }
Пример #2
0
        public override void EndMethod(APC methodEntry, bool ignoreMethodEntryAPC)
        {
            // this is the case when EndMethod was already called
            if (expectedOutcomes == null)
            {
                return;
            }

            if (!this.skipCurrentMethod && !expectedOutcomes.Passed(false))
            {
                this.errorCount += expectedOutcomes.Errors;
                base.WriteLine("Method {0}", mdDecoder.FullName(this.currentMethod));
                expectedOutcomes.ReportRegressions(this.UnderlyingOutput);
            }
            base.EndMethod(methodEntry, ignoreMethodEntryAPC);
            expectedOutcomes = null;
        }