Exemplo n.º 1
0
            public void negative_dimension_throws()
            {
                var v = new Vector2F();

                Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(-1));
                Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(int.MinValue));
            }
Exemplo n.º 2
0
            public void large_dimension_throws()
            {
                var v = new Vector2F();

                Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(2));
                Assert.Throws <ArgumentOutOfRangeException>(() => v.Get(int.MaxValue));
            }
Exemplo n.º 3
0
            public void can_get_all_componenets()
            {
                var v = new Vector2F(-1.0f, 5.0f);

                Assert.Equal(-1.0f, v.Get(0));
                Assert.Equal(5.0f, v.Get(1));
            }
Exemplo n.º 4
0
            public void can_set_all_componenets()
            {
                var v = new Vector2F(2, 3);

                v[0] = -1.0f;
                v[1] = 5.0f;

                Assert.Equal(-1.0f, v.Get(0));
                Assert.Equal(5.0f, v.Get(1));
            }
Exemplo n.º 5
0
            public void can_set_all_componenets()
            {
                var v = new Vector2F(2, 3);

                v.Set(0, -1.0f);
                v.Set(1, 5.0f);

                Assert.Equal(-1.0f, v.Get(0));
                Assert.Equal(5.0f, v.Get(1));
            }