Пример #1
0
        public VerificationResult(string sourceLabel, ProcessInvoker pinv, IVerificationResultParser parser)
        {
            _sourceLabel = sourceLabel;
            _cpuTime     = pinv.cpuTime;
            messages     = new List <VerificationMessage>();

            string stdout = pinv.getStdout();

            if (!whitespace.Match(stdout).Success)
            {
                messages.Add(new VerificationMessage(sourceLabel, stdout));
            }
            string stderr = pinv.getStderr();

            if (!whitespace.Match(stderr).Success)
            {
                messages.Add(new VerificationMessage(sourceLabel, stderr));
            }

            _parseFailures        = 0;
            _verificationFailures = 0;
            _timeouts             = 0;
            parser.parseOutput(stdout + stderr, out _parseFailures, out _verificationFailures, out _timeouts);
            _pass = _parseFailures == 0 && _verificationFailures == 0 && _timeouts == 0;
        }
Пример #2
0
        public VerificationResult(string sourceLabel, double cpuTime, string stdout, string stderr, IVerificationResultParser parser)
        {
            this._sourceLabel = sourceLabel;
            this._cpuTime = cpuTime;
            this.messages = new List<VerificationMessage>();

            // REVIEW: Switch from whitespace Regex to string.IsNullOrWhiteSpace()?
            if (!whitespace.Match(stdout).Success)
            {
                this.messages.Add(new VerificationMessage(sourceLabel, stdout));
            }

            if (!whitespace.Match(stderr).Success)
            {
                this.messages.Add(new VerificationMessage(sourceLabel, stderr));
            }

            this._parseFailures = 0;
            this._verificationFailures = 0;
            this._timeouts = 0;
            parser.parseOutput(stdout + stderr, out this._parseFailures, out this._verificationFailures, out this._timeouts);
            this._pass = this._parseFailures == 0 && this._verificationFailures == 0 && this._timeouts == 0;
        }
Пример #3
0
        public VerificationResult(string sourceLabel, double cpuTime, string stdout, string stderr, IVerificationResultParser parser)
        {
            this._sourceLabel = sourceLabel;
            this._cpuTime     = cpuTime;
            this.messages     = new List <VerificationMessage>();

            // REVIEW: Switch from whitespace Regex to string.IsNullOrWhiteSpace()?
            if (!whitespace.Match(stdout).Success)
            {
                this.messages.Add(new VerificationMessage(sourceLabel, stdout));
            }

            if (!whitespace.Match(stderr).Success)
            {
                this.messages.Add(new VerificationMessage(sourceLabel, stderr));
            }

            this._parseFailures        = 0;
            this._verificationFailures = 0;
            this._timeouts             = 0;
            parser.parseOutput(stdout + stderr, out this._parseFailures, out this._verificationFailures, out this._timeouts);
            this._pass = this._parseFailures == 0 && this._verificationFailures == 0 && this._timeouts == 0;
        }