Exemplo n.º 1
0
        public void GetByte_returns_correct_bytes()
        {
            Assert.That(Quad.GetByte(0), Is.EqualTo(A0));
            Assert.That(Quad.GetByte(1), Is.EqualTo(A1));
            Assert.That(Quad.GetByte(2), Is.EqualTo(A2));
            Assert.That(Quad.GetByte(3), Is.EqualTo(A3));

            Assert.That(Quad.GetByte(4), Is.EqualTo(B0));
            Assert.That(Quad.GetByte(5), Is.EqualTo(B1));
            Assert.That(Quad.GetByte(6), Is.EqualTo(B2));
            Assert.That(Quad.GetByte(7), Is.EqualTo(B3));

            Assert.That(Quad.GetByte(8), Is.EqualTo(C0));
            Assert.That(Quad.GetByte(9), Is.EqualTo(C1));
            Assert.That(Quad.GetByte(10), Is.EqualTo(C2));
            Assert.That(Quad.GetByte(11), Is.EqualTo(C3));

            Assert.That(Quad.GetByte(12), Is.EqualTo(D0));
            Assert.That(Quad.GetByte(13), Is.EqualTo(D1));
            Assert.That(Quad.GetByte(14), Is.EqualTo(D2));
            Assert.That(Quad.GetByte(15), Is.EqualTo(D3));
        }
Exemplo n.º 2
0
        public void GetByte_returns_correct_bytes()
        {
            Assert.AreEqual(A0, Quad.GetByte(0));
            Assert.AreEqual(A1, Quad.GetByte(1));
            Assert.AreEqual(A2, Quad.GetByte(2));
            Assert.AreEqual(A3, Quad.GetByte(3));

            Assert.AreEqual(B0, Quad.GetByte(4));
            Assert.AreEqual(B1, Quad.GetByte(5));
            Assert.AreEqual(B2, Quad.GetByte(6));
            Assert.AreEqual(B3, Quad.GetByte(7));

            Assert.AreEqual(C0, Quad.GetByte(8));
            Assert.AreEqual(C1, Quad.GetByte(9));
            Assert.AreEqual(C2, Quad.GetByte(10));
            Assert.AreEqual(C3, Quad.GetByte(11));

            Assert.AreEqual(D0, Quad.GetByte(12));
            Assert.AreEqual(D1, Quad.GetByte(13));
            Assert.AreEqual(D2, Quad.GetByte(14));
            Assert.AreEqual(D3, Quad.GetByte(15));
        }
Exemplo n.º 3
0
 public void GetByte_throws_on_too_large_index()
 {
     Assert.That(() => Quad.GetByte(16), Throws.TypeOf <ArgumentOutOfRangeException>());
 }
Exemplo n.º 4
0
 public void GetByte_throws_on_negative_index()
 {
     Assert.That(() => Quad.GetByte(-1), Throws.TypeOf <ArgumentOutOfRangeException>());
 }
Exemplo n.º 5
0
 public void GetByte_throws_on_too_large_index()
 {
     Quad.GetByte(16);
 }
Exemplo n.º 6
0
 public void GetByte_throws_on_negative_index()
 {
     Quad.GetByte(-1);
 }