IncrementAssertionResult() public method

public IncrementAssertionResult ( bool passed ) : void
passed bool
return void
        public override void Execute(TestBench test, ProcessorState state)
        {
            Match m = assertionOperation.Match(Parameters);

            if (m.Success)
            {
                string a      = m.Groups["a"].Value.Trim();
                string b      = m.Groups["b"].Value.Trim();
                string op     = m.Groups["op"].Value.Trim();
                bool   passed = false;

                if (string.Compare(op, "==", true) == 0)
                {
                    if (GetValueForString(a, state) == GetValueForString(b, state))
                    {
                        passed = true;
                    }
                }
                else if (string.Compare(op, "!=", true) == 0)
                {
                    if (GetValueForString(a, state) != GetValueForString(b, state))
                    {
                        passed = true;
                    }
                }

                if (!passed)
                {
                    Logger.Instance.WriteError("Assertion failed 0x{0:X4}@{1}, '{2}' <> '{3} {4} {5}'",
                                               Address * 2, CyclesAfterEvent, Parameters,
                                               GetValueForString(a, state), op, GetValueForString(b, state));
                }

                test.IncrementAssertionResult(passed);
                return;
            }

            Console.WriteLine("Malformed assertion! '{0}'", Parameters);
        }
        public override void Execute(TestBench test, ProcessorState state)
        {
            Match m = assertionOperation.Match(Parameters);
            if (m.Success)
            {
                string a = m.Groups["a"].Value.Trim();
                string b = m.Groups["b"].Value.Trim();
                string op = m.Groups["op"].Value.Trim();
                bool passed = false;

                if (string.Compare(op, "==", true) == 0)
                {
                    if (GetValueForString(a, state) == GetValueForString(b, state))
                    {
                        passed = true;
                    }
                }
                else if (string.Compare(op, "!=", true) == 0)
                {
                    if (GetValueForString(a, state) != GetValueForString(b, state))
                    {
                        passed = true;
                    }
                }

                if (!passed)
                {
                    Logger.Instance.WriteError("Assertion failed 0x{0:X4}@{1}, '{2}' <> '{3} {4} {5}'",
                        Address * 2, CyclesAfterEvent, Parameters,
                        GetValueForString(a, state), op, GetValueForString(b, state));
                }

                test.IncrementAssertionResult(passed);
                return;
            }

            Console.WriteLine("Malformed assertion! '{0}'", Parameters);
        }