Beispiel #1
0
        public void testClosestTime()
        {
            // Testing that the returned time matches the requested index
            List <double> test_times = new List <double> {
                1.0, 2.0, 5.0
            };
            TimeGrid tg            = new TimeGrid(test_times);
            int      expected_time = 5;

            QAssert.IsTrue(tg.closestTime(4).IsEqual(expected_time),
                           "Expected time of: " + expected_time + ", which does not match " +
                           "the returned time: " + tg.closestTime(4));
        }