コード例 #1
0
ファイル: HijackingTestDriver.cs プロジェクト: garuma/heisen
        public bool RunTest(out IReplayInformations infos)
        {
            infos = null;
            AssertException exception = null;

            Action invariantsEncapsulated = delegate {
                try {
                    invariantsMethod ();
                } catch (TargetInvocationException e) {
                    Scheduler.Stop ();
                    exception = e.InnerException as AssertException;
                }
            };

            foreach (Action action in testMethods)
                Scheduler.EnqueueWork (new HeisenThread (action));

            Scheduler.Run (initMethod, invariantsEncapsulated);
            Console.WriteLine ("Test concluded after {0} mixed-interleaving runs", Scheduler.NumberOfRun.ToString ());

            if (exception != null)
                infos = new ReplayInfos (exception);

            return exception == null;
        }
コード例 #2
0
ファイル: HijackingTestDriver.cs プロジェクト: garuma/heisen
 public bool ReplayScenario(IReplayInformations infos)
 {
     return true;
 }