Example #1
0
        public void TestRange_Return_True()
        {
            TableRange robotRange = new TableRange();

            robotRange.Table(7, 7);
            bool result = robotRange.validatePosition(3, 7);

            Assert.AreEqual(true, result);
        }
Example #2
0
        public void TestRange_Return_False_2()
        {
            TableRange robotRange = new TableRange();

            robotRange.Table(5, 5);
            bool result = robotRange.validatePosition(-1, -2);

            Assert.AreEqual(false, result);
        }
Example #3
0
        public CodePointIndexer(int [] starts, int [] ends, int defaultIndex, int defaultCP)
        {
            this.defaultIndex = defaultIndex;
            this.defaultCP    = defaultCP;
            ranges            = new TableRange [starts.Length];
            for (int i = 0; i < ranges.Length; i++)
            {
                ranges [i] = new TableRange(starts [i],
                                            ends [i], i == 0 ? 0 :
                                            ranges [i - 1].IndexStart +
                                            ranges [i - 1].Count);
            }
            for (int i = 0; i < ranges.Length; i++)
            {
                TotalCount += ranges [i].Count;
            }

//			for (int i = 0; i < ranges.Length; i++)
//				Console.Error.WriteLine ("RANGES [{0}] : {1:x} to {2:x} index {3:x} to {4:x}. total {5:x}", i, ranges [i].Start, ranges [i].End, ranges [i].IndexStart, ranges [i].IndexEnd, ranges [i].Count);
//			Console.Error.WriteLine ("Total items: {0:X} ({1})", TotalCount, TotalCount);
        }
Example #4
0
 public static DataTable Read(string filePath, string tabName, TableRange range)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public static DataTable Read(Stream stream, string tabName, TableRange range)
 {
     throw new NotImplementedException();
 }
Example #6
0
		public CodePointIndexer (int [] starts, int [] ends, int defaultIndex, int defaultCP)
		{
			this.defaultIndex = defaultIndex;
			this.defaultCP = defaultCP;
			ranges = new TableRange [starts.Length];
			for (int i = 0; i < ranges.Length; i++)
				ranges [i] = new TableRange (starts [i],
					ends [i], i == 0 ? 0 :
					ranges [i - 1].IndexStart +
					ranges [i - 1].Count);
			for (int i = 0; i < ranges.Length; i++)
				TotalCount += ranges [i].Count;

//			for (int i = 0; i < ranges.Length; i++)
//				Console.Error.WriteLine ("RANGES [{0}] : {1:x} to {2:x} index {3:x} to {4:x}. total {5:x}", i, ranges [i].Start, ranges [i].End, ranges [i].IndexStart, ranges [i].IndexEnd, ranges [i].Count);
//			Console.Error.WriteLine ("Total items: {0:X} ({1})", TotalCount, TotalCount);
		}