Example #1
0
 public void GenerateOk()
 {
     const int width = 43;
       const int height = 29;
       var b = new BoolMatrix(width, height);
       var c = b.Generate(1);
       Assert.IsNotNull(c);
 }
Example #2
0
        public void Get()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              b[13, 11] = true;
              Assert.IsTrue(b.Get(new IntCoordinate(11, 13)));
        }
Example #3
0
        public void GenerateOk()
        {
            const int width  = 43;
            const int height = 29;
            var       b      = new BoolMatrix(width, height);
            var       c      = b.Generate(1);

            Assert.IsNotNull(c);
        }
Example #4
0
        public void Constructor()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              Assert.AreEqual(width, b.Width);
              Assert.AreEqual(height, b.Height);
        }
Example #5
0
        public void Get()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);

            b[13, 11] = true;
            Assert.IsTrue(b.Get(new IntCoordinate(11, 13)));
        }
Example #6
0
        public void Constructor()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);

            Assert.AreEqual(width, b.Width);
            Assert.AreEqual(height, b.Height);
        }
Example #7
0
        public void IsNotInside()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);

            Assert.IsFalse(b.IsInside(new IntCoordinate(111, 133)));
            Assert.IsFalse(b.IsInside(new IntCoordinate(width, height)));
            Assert.IsFalse(b.IsInside(new IntCoordinate(-1, -1)));
        }
Example #8
0
        public void IsInside()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);

            Assert.IsTrue(b.IsInside(new IntCoordinate(11, 13)));
            Assert.IsTrue(b.IsInside(new IntCoordinate(width - 1, height - 1)));
            Assert.IsTrue(b.IsInside(new IntCoordinate(0, 0)));
        }
Example #9
0
        public void Set()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);
            var c = new IntCoordinate(11, 13);

            b.Set(c, true);
            Assert.IsTrue(b.Get(c));
        }
Example #10
0
        public void This()
        {
            const int width  = 43;
            const int height = 29;

            var b = new BoolMatrix(width, height);

            Assert.IsFalse(b[11, 13]);
            b[11, 13] = true;
            Assert.IsTrue(b[11, 13]);
            b[11, 13] = false;
            Assert.IsFalse(b[11, 13]);
        }
Example #11
0
 public void GenerateFail()
 {
     const int width = 43;
       const int height = 29;
       var b = new BoolMatrix(width, height);
       for (int y = 0; y < height; y++)
     {
       for (int x = 0; x < width; x++)
     {
       b[y, x] = true;
     }
     }
       var c = b.Generate(1);
       Assert.IsNull(c);
 }
Example #12
0
        public void GenerateFail()
        {
            const int width  = 43;
            const int height = 29;
            var       b      = new BoolMatrix(width, height);

            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    b[y, x] = true;
                }
            }
            var c = b.Generate(1);

            Assert.IsNull(c);
        }
Example #13
0
        public void IsNotInside()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              Assert.IsFalse(b.IsInside(new IntCoordinate(111, 133)));
              Assert.IsFalse(b.IsInside(new IntCoordinate(width, height)));
              Assert.IsFalse(b.IsInside(new IntCoordinate(-1, -1)));
        }
Example #14
0
        public void IsInside()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              Assert.IsTrue(b.IsInside(new IntCoordinate(11, 13)));
              Assert.IsTrue(b.IsInside(new IntCoordinate(width - 1, height - 1)));
              Assert.IsTrue(b.IsInside(new IntCoordinate(0, 0)));
        }
Example #15
0
        public void This()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              Assert.IsFalse(b[11, 13]);
              b[11, 13] = true;
              Assert.IsTrue(b[11, 13]);
              b[11, 13] = false;
              Assert.IsFalse(b[11, 13]);
        }
Example #16
0
        public void Set()
        {
            const int width = 43;
              const int height = 29;

              var b = new BoolMatrix(width, height);
              var c = new IntCoordinate(11, 13);
              b.Set(c, true);
              Assert.IsTrue(b.Get(c));
        }