@@ -20,7 +20,7 @@ public static class VectorFloat32TestData
2020 public static float [ ] testData = new float [ ] { 1.1f , 2.2f , 3.3f } ;
2121 public static int vectorColumnLength = testData . Length ;
2222 // Incorrect size for SqlParameter.Size
23- public static int IncorrectParamSize = 3234 ;
23+ public static int IncorrectParamSize = 3234 ;
2424 public static IEnumerable < object [ ] > GetVectorFloat32TestData ( )
2525 {
2626 // Pattern 1-4 with SqlVector<float>(values: testData)
@@ -43,11 +43,11 @@ public static IEnumerable<object[]> GetVectorFloat32TestData()
4343
4444 // Pattern 1-4 with SqlVector<float>.Null
4545 yield return new object [ ] { 1 , SqlVector < float > . Null , Array . Empty < float > ( ) , vectorColumnLength } ;
46-
46+
4747 // Following scenario is not supported in SqlClient.
4848 // This can only be fixed with a behavior change that SqlParameter.Value is internally set to DBNull.Value if it is set to null.
4949 //yield return new object[] { 2, SqlVector<float>.Null, Array.Empty<float>(), vectorColumnLength };
50-
50+
5151 yield return new object [ ] { 3 , SqlVector < float > . Null , Array . Empty < float > ( ) , vectorColumnLength } ;
5252 yield return new object [ ] { 4 , SqlVector < float > . Null , Array . Empty < float > ( ) , vectorColumnLength } ;
5353 }
@@ -128,7 +128,7 @@ private void ValidateInsertedData(SqlConnection connection, float[] expectedData
128128 ValidateSqlVectorFloat32Object ( reader . IsDBNull ( 0 ) , ( SqlVector < float > ) reader . GetSqlValue ( 0 ) , expectedData , expectedLength ) ;
129129
130130 if ( ! reader . IsDBNull ( 0 ) )
131- {
131+ {
132132 ValidateSqlVectorFloat32Object ( reader . IsDBNull ( 0 ) , ( SqlVector < float > ) reader . GetValue ( 0 ) , expectedData , expectedLength ) ;
133133 ValidateSqlVectorFloat32Object ( reader . IsDBNull ( 0 ) , ( SqlVector < float > ) reader [ 0 ] , expectedData , expectedLength ) ;
134134 ValidateSqlVectorFloat32Object ( reader . IsDBNull ( 0 ) , ( SqlVector < float > ) reader [ "VectorData" ] , expectedData , expectedLength ) ;
@@ -147,7 +147,7 @@ private void ValidateInsertedData(SqlConnection connection, float[] expectedData
147147 }
148148 }
149149
150- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
150+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
151151 [ MemberData ( nameof ( VectorFloat32TestData . GetVectorFloat32TestData ) , MemberType = typeof ( VectorFloat32TestData ) , DisableDiscoveryEnumeration = true ) ]
152152 public void TestSqlVectorFloat32ParameterInsertionAndReads (
153153 int pattern ,
@@ -213,7 +213,7 @@ private async Task ValidateInsertedDataAsync(SqlConnection connection, float[] e
213213 }
214214 }
215215
216- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
216+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
217217 [ MemberData ( nameof ( VectorFloat32TestData . GetVectorFloat32TestData ) , MemberType = typeof ( VectorFloat32TestData ) , DisableDiscoveryEnumeration = true ) ]
218218 public async Task TestSqlVectorFloat32ParameterInsertionAndReadsAsync (
219219 int pattern ,
@@ -247,7 +247,7 @@ public async Task TestSqlVectorFloat32ParameterInsertionAndReadsAsync(
247247 await ValidateInsertedDataAsync ( conn , expectedValues , expectedLength ) ;
248248 }
249249
250- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
250+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
251251 [ MemberData ( nameof ( VectorFloat32TestData . GetVectorFloat32TestData ) , MemberType = typeof ( VectorFloat32TestData ) , DisableDiscoveryEnumeration = true ) ]
252252 public void TestStoredProcParamsForVectorFloat32 (
253253 int pattern ,
@@ -304,7 +304,7 @@ public void TestStoredProcParamsForVectorFloat32(
304304 Assert . Throws < InvalidOperationException > ( ( ) => command . ExecuteNonQuery ( ) ) ;
305305 }
306306
307- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
307+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
308308 [ MemberData ( nameof ( VectorFloat32TestData . GetVectorFloat32TestData ) , MemberType = typeof ( VectorFloat32TestData ) , DisableDiscoveryEnumeration = true ) ]
309309 public async Task TestStoredProcParamsForVectorFloat32Async (
310310 int pattern ,
@@ -361,7 +361,7 @@ public async Task TestStoredProcParamsForVectorFloat32Async(
361361 await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) => await command . ExecuteNonQueryAsync ( ) ) ;
362362 }
363363
364- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
364+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
365365 [ InlineData ( 1 ) ]
366366 [ InlineData ( 2 ) ]
367367 public void TestBulkCopyFromSqlTable ( int bulkCopySourceMode )
@@ -374,8 +374,8 @@ public void TestBulkCopyFromSqlTable(int bulkCopySourceMode)
374374 DataTable table = null ;
375375 switch ( bulkCopySourceMode )
376376 {
377-
378- case 1 :
377+
378+ case 1 :
379379 // Use SqlServer table as source
380380 var insertCmd = new SqlCommand ( $ "insert into { s_bulkCopySrcTableName } values (@VectorData)", sourceConnection ) ;
381381 var vectorParam = new SqlParameter ( s_vectorParamName , new SqlVector < float > ( VectorFloat32TestData . testData ) ) ;
@@ -400,8 +400,8 @@ public void TestBulkCopyFromSqlTable(int bulkCopySourceMode)
400400 throw new ArgumentOutOfRangeException ( nameof ( bulkCopySourceMode ) , $ "Unsupported bulk copy source mode: { bulkCopySourceMode } ") ;
401401 }
402402
403-
404-
403+
404+
405405 //Bulkcopy from sql server table to destination table
406406 using SqlCommand sourceDataCommand = new SqlCommand ( $ "SELECT Id, VectorData FROM { s_bulkCopySrcTableName } ", sourceConnection ) ;
407407 using SqlDataReader reader = sourceDataCommand . ExecuteReader ( ) ;
@@ -460,7 +460,7 @@ public void TestBulkCopyFromSqlTable(int bulkCopySourceMode)
460460 Assert . Equal ( VectorFloat32TestData . testData . Length , ( ( SqlVector < float > ) verifyReader . GetSqlVector < float > ( 0 ) ) . Length ) ;
461461 }
462462
463- [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
463+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
464464 [ InlineData ( 1 ) ]
465465 [ InlineData ( 2 ) ]
466466 public async Task TestBulkCopyFromSqlTableAsync ( int bulkCopySourceMode )
@@ -560,7 +560,7 @@ public async Task TestBulkCopyFromSqlTableAsync(int bulkCopySourceMode)
560560 Assert . Equal ( VectorFloat32TestData . testData . Length , vector . Length ) ;
561561 }
562562
563- [ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsVectorSupported ) ) ]
563+ [ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsAzureServer ) ) ]
564564 public void TestInsertVectorsFloat32WithPrepare ( )
565565 {
566566 SqlConnection conn = new SqlConnection ( s_connectionString ) ;
0 commit comments