Beispiel #1
0
 private static void Test11Helper(uint start, uint stop, bool[] isInfExpected,
                                  bool[] isVisited, uint[][][] stampsExpected, Departments dps)
 {
     for (uint i = start; i < stop; ++i)
     {
         DepartmentsQuery expected = new DepartmentsQuery(isInfExpected[i],
                                                          isVisited[i], stampsExpected[i]);
         if (!expected.EqualTo(dps.Query(i + 1)))
         {
             isTest11Correct = false;
         }
     }
 }
Beispiel #2
0
        private static Thread StartTheThread(uint start, uint stop, bool[] isInfExpected,
                                             bool[] isVisited, uint[][][] stampsExpected, Departments dps)
        {
            var t = new Thread(() => Test11Helper(start, stop, isInfExpected,
                                                  isVisited, stampsExpected, dps));

            t.Start();
            return(t);
        }
Beispiel #3
0
        private static bool MyTestHelper(bool[] isInfExpected, bool[] isVisited, uint[][][] stampsExpected, Departments dps, uint n)
        {
            bool tmp = true;

            for (uint i = 0; i < n; ++i)
            {
                DepartmentsQuery expected = new DepartmentsQuery(isInfExpected[i], isVisited[i], stampsExpected[i]);
                tmp = tmp && expected.EqualTo(dps.Query(i + 1));
                if (tmp == false)
                {
                    break;
                }
            }
            return(tmp);
        }