@@ -60,6 +60,99 @@ private void TestConstructor<T>() where T : struct
60
60
} ) ;
61
61
}
62
62
63
+ [ Fact ]
64
+ public void ConstructorArrayWithCountExceptionByte ( )
65
+ {
66
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
67
+ {
68
+ TestConstructorArrayWithCountException < Byte > ( ) ;
69
+ }
70
+ }
71
+ [ Fact ]
72
+ public void ConstructorArrayWithCountExceptionSByte ( )
73
+ {
74
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
75
+ {
76
+ TestConstructorArrayWithCountException < SByte > ( ) ;
77
+ }
78
+ }
79
+ [ Fact ]
80
+ public void ConstructorArrayWithCountExceptionUInt16 ( )
81
+ {
82
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
83
+ {
84
+ TestConstructorArrayWithCountException < UInt16 > ( ) ;
85
+ }
86
+ }
87
+ [ Fact ]
88
+ public void ConstructorArrayWithCountExceptionInt16 ( )
89
+ {
90
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
91
+ {
92
+ TestConstructorArrayWithCountException < Int16 > ( ) ;
93
+ }
94
+ }
95
+ [ Fact ]
96
+ public void ConstructorArrayWithCountExceptionUInt32 ( )
97
+ {
98
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
99
+ {
100
+ TestConstructorArrayWithCountException < UInt32 > ( ) ;
101
+ }
102
+ }
103
+ [ Fact ]
104
+ public void ConstructorArrayWithCountExceptionInt32 ( )
105
+ {
106
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
107
+ {
108
+ TestConstructorArrayWithCountException < Int32 > ( ) ;
109
+ }
110
+ }
111
+ [ Fact ]
112
+ public void ConstructorArrayWithCountExceptionUInt64 ( )
113
+ {
114
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
115
+ {
116
+ TestConstructorArrayWithCountException < UInt64 > ( ) ;
117
+ }
118
+ }
119
+ [ Fact ]
120
+ public void ConstructorArrayWithCountExceptionInt64 ( )
121
+ {
122
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
123
+ {
124
+ TestConstructorArrayWithCountException < Int64 > ( ) ;
125
+ }
126
+ }
127
+ [ Fact ]
128
+ public void ConstructorArrayWithCountExceptionSingle ( )
129
+ {
130
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
131
+ {
132
+ TestConstructorArrayWithCountException < Single > ( ) ;
133
+ }
134
+ }
135
+ [ Fact ]
136
+ public void ConstructorArrayWithCountExceptionDouble ( )
137
+ {
138
+ for ( int counter = 0 ; counter < 100 ; ++ counter )
139
+ {
140
+ TestConstructorArrayWithCountException < Double > ( ) ;
141
+ }
142
+ }
143
+ private void TestConstructorArrayWithCountException < T > ( ) where T : struct
144
+ {
145
+ Assert . Throws < NullReferenceException > ( ( ) => new Vector < T > ( ( T [ ] ) null , 0 ) ) ;
146
+
147
+ T [ ] values = GenerateRandomValuesForVector < T > ( ) . ToArray ( ) ;
148
+ var vector = new Vector < T > ( values ) ;
149
+ ValidateVector ( vector ,
150
+ ( index , val ) =>
151
+ {
152
+ Assert . Equal ( values [ index ] , val ) ;
153
+ } ) ;
154
+ }
155
+
63
156
[ Fact ]
64
157
public void ConstructorWithOffsetByte ( ) { TestConstructorWithOffset < Byte > ( ) ; }
65
158
[ Fact ]
0 commit comments