+ for (int i = 0; i < 10; ++i)
+ sum = sum + add;
+
+ if (sum.X != 10f)
+ return 1;
+ return 0;
+ }
+
+ public static int test_0_vector16b_operator_neq () {
+ Vector16b a = new Vector16b(1,2,3,5,5,6,7,8,1,2,3,5,5,6,7,8);
+ Vector16b b = new Vector16b(1,2,3,5,5,6,7,8,1,2,3,5,5,6,7,8);
+ if (a != b)
+ return 1;
+ b.V0 = 99;
+ if (!(a != b))
+ return 2;
+ return 0;
+ }
+
+ public static int test_0_vector16b_operator_eq () {
+ Vector16b a = new Vector16b(1,2,3,5,5,6,7,8,1,2,3,5,5,6,7,8);
+ Vector16b b = new Vector16b(1,2,3,5,5,6,7,8,1,2,3,5,5,6,7,8);
+ if (!(a == b))
+ return 1;
+ b.V0 = 99;
+ if (a == b)
+ return 2;
+ return 0;
+ }
+
+ public static int test_0_vector8us_operator_neq () {
+ Vector8us a = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
+ Vector8us b = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
+ if (a != b)
+ return 1;
+ b.V0 = 99;
+ if (!(a != b))
+ return 2;
+ return 0;
+ }
+
+ public static int test_0_vector8us_operator_eq () {
+ Vector8us a = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
+ Vector8us b = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
+ if (!(a == b))
+ return 1;
+ b.V0 = 99;
+ if (a == b)
+ return 2;
+ return 0;
+ }
+
+ public static int test_0_set_vector4f_operator_neq () {
+ Vector4f a = new Vector4f(1, 2, 3, 4);
+ Vector4f b = new Vector4f(1, 2, 3, 4);
+ if (a != b)
+ return 1;
+
+ a = new Vector4f(1, 2, float.NaN, 4);
+ b = new Vector4f(1, 2, float.NaN, 4);
+ if (!(a != b)) //NaN is always !=
+ return 2;
+
+ a = new Vector4f(1, 2, float.NaN, 4);
+ b = new Vector4f(1, 2, 10, 4);
+ if (!(a != b))
+ return 3;
+
+ a = new Vector4f(1, 2, float.PositiveInfinity, 4);
+ b = new Vector4f(1, 2, float.PositiveInfinity, 4);
+ if (a != b)
+ return 4;
+
+ a = new Vector4f(1, 2, 20, 4);
+ b = new Vector4f(1, 2, 30, 4);
+ if (!(a != b))
+ return 5;
+
+ return 0;
+ }
+
+ public static int test_0_set_vector4f_operator_eq () {
+ Vector4f a = new Vector4f(1, 2, 3, 4);
+ Vector4f b = new Vector4f(1, 2, 3, 4);
+ if (!(a == b))
+ return 1;
+
+ a = new Vector4f(1, 2, float.NaN, 4);
+ b = new Vector4f(1, 2, float.NaN, 4);
+ if (a == b)
+ return 2;
+
+ a = new Vector4f(1, 2, 10, 4);
+ b = new Vector4f(1, 2, float.NaN, 4);
+ if (a == b)
+ return 3;
+
+ a = new Vector4f(1, 2, float.PositiveInfinity, 4);
+ b = new Vector4f(1, 2, float.PositiveInfinity, 4);
+ if (!(a == b))
+ return 4;
+ return 0;
+ }
+
+ public static int test_1_set_vector4ui_operator_neq () {
+ Vector4ui a = new Vector4ui(1, 2, 3, 4);
+ Vector4ui b = new Vector4ui(1, 2, 3, 4);
+ if (a != b)
+ return 0;
+ return 1;
+ }
+
+ public static int test_0_set_vector4ui_operator_neq () {
+ Vector4ui a = new Vector4ui(1, 2, 3, 4);
+ Vector4ui b = new Vector4ui(111, 2, 3, 4);
+ if (a != b)
+ return 0;
+ return 1;
+ }
+
+ public static int test_0_set_vector4ui_operator_eq () {
+ Vector4ui a = new Vector4ui(1, 2, 3, 4);
+ Vector4ui b = new Vector4ui(1, 2, 3, 4);
+ if (a == b)
+ return 0;
+ return 1;
+ }
+
+ public static int test_1_set_vector4ui_operator_eq () {
+ Vector4ui a = new Vector4ui(1, 2, 3, 4);
+ Vector4ui b = new Vector4ui(111, 2, 3, 4);
+ if (a == b)
+ return 0;
+ return 1;
+ }
+
+ public static int test_0_set_vector_small_array () {
+ uint[] array = new uint[3];
+
+ try {
+ array.SetVector (new Vector4ui (), 0);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_set_vector_negative_index () {
+ uint[] array = new uint[4];
+
+ try {
+ array.SetVector (new Vector4ui (), -1);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_set_vector_bounds_error () {
+ uint[] array = new uint[4];
+
+ try {
+ array.SetVector (new Vector4ui (), 1);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_set_vector () {
+ uint[] array = new uint[10];
+ Vector4ui a = new Vector4ui (11, 22, 33, 44);
+
+ array.SetVector (a, 1);
+
+ if (array [1] != 11)
+ return 1;
+ if (array [2] != 22)
+ return 2;
+ if (array [3] != 33)
+ return 3;
+ if (array [4] != 44)
+ return 4;
+ return 0;
+ }
+
+ public static int test_0_get_vector_small_array () {
+ uint[] array = new uint[3];
+
+ try {
+ Vector4ui res = array.GetVector (0);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_get_vector_negative_index () {
+ uint[] array = new uint[4];
+
+ try {
+ Vector4ui res = array.GetVector (-1);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_get_vector_bounds_error () {
+ uint[] array = new uint[4];
+
+ try {
+ Vector4ui res = array.GetVector (1);
+ return 1;
+ } catch (IndexOutOfRangeException) {
+ }
+ return 0;
+ }
+
+ public static int test_0_get_vector () {
+ uint[] array = new uint[] { 11, 22, 33, 44, 55, 66, 77, 88, 99, 111 };
+
+ Vector4ui res = array.GetVector (1);
+
+ if (res.X != 22)
+ return 1;
+ if (res.Y != 33)
+ return 2;
+ if (res.Z != 44)
+ return 3;
+ if (res.W != 55)
+ return 4;
+
+ return 0;
+ }
+
+ public static int test_0_accessor_vecto2l () {
+ Vector2l a = new Vector2l (3, 2);
+
+ if (a.X != 3)
+ return 1;
+ if (a.Y != 2)
+ return 2;
+
+ a.X = 500000000000055l;
+ a.Y = -12345678900l;
+
+ if (a.X != 500000000000055l)
+ return 3;
+ if (a.Y != -12345678900l)
+ return 4;
+ return 0;
+ }
+
+ public static int test_0_accessor_vecto2d () {
+ Vector2d a = new Vector2d (3, 2);
+
+ if (a.X != 3)
+ return 1;
+ if (a.Y != 2)
+ return 2;
+
+ a.X = 5000000000000;
+ a.Y = -0.5;
+
+ if (a.X != 5000000000000)
+ return 3;
+ if (a.Y != -0.5)
+ return 4;
+ return 0;
+ }
+
+ public static int test_0_accessor_vecto4f () {
+ Vector4f a = new Vector4f (1,2,3,4);
+
+ if (a.X != 1)
+ return 1;
+ if (a.Y != 2)
+ return 2;
+ if (a.Z != 3)
+ return 3;
+ if (a.W != 4)
+ return 4;
+
+ a.X = 128f;
+ a.Y = 256f;
+ a.Z = -0.5f;
+ a.W = 0.125f;
+
+ if (a.X != 128)
+ return 5;
+ if (a.Y != 256)
+ return 6;
+ if (a.Z != -0.5)
+ return 7;
+ if (a.W != 0.125)
+ return 8;
+ return 0;
+ }
+
+ public static int test_0_accessor_vecto4i () {
+ Vector4i a = new Vector4i (0x70000000, -1, 3, 4);
+
+ if (a.X != 0x70000000)
+ return 1;
+ if (a.Y != -1)
+ return 2;
+ if (a.Z != 3)
+ return 3;
+ if (a.W != 4)
+ return 4;
+
+ a.X = 11;
+ a.Y = 22;
+ a.Z = 33333344;
+ a.W = -44444444;
+
+ if (a.X != 11)
+ return 5;
+ if (a.Y != 22)
+ return 6;
+ if (a.Z != 33333344)
+ return 7;
+ if (a.W != -44444444)
+ return 8;
+ return 0;
+ }