Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8a8f95b

Browse files
AfsanehR-zzstephentoub
authored andcommitted
Fix SqlClient udtTest (#35304)
* Fix UdtTest2 * fix UdtBulkCopyTest
1 parent 507eb16 commit 8a8f95b

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtBulkCopyTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ public void RunCopyTest()
3636
"FieldType[1] = Point" + Environment.NewLine +
3737
" redmond, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
3838
" bellevue, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
39-
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
39+
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
4040
" portland, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
4141
" LA, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
4242
" SFO, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
43-
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
43+
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
4444
" new york, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
45-
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.0156211871642" + Environment.NewLine;
45+
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.01562118716424" + Environment.NewLine;
4646

4747
CopyTableTest(_connStr, "cities", cities, expectedResults);
4848

src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UdtTest2.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,18 @@ public void UDTParams_InputOutput()
264264

265265
cmd.ExecuteNonQuery();
266266
DataTestUtility.AssertEqualsWithDescription(
267-
"141.42135623731", ((Point)(p.Value)).Distance().ToString(),
267+
"141.4213562373095", ((Point)(p.Value)).Distance().ToString(),
268268
"Unexpected distance value.");
269269
DataTestUtility.AssertEqualsWithDescription(
270-
"141.42135623731", ((Point)(p.Value)).Distance().ToString(),
270+
"141.4213562373095", ((Point)(p.Value)).Distance().ToString(),
271271
"Unexpected distance value after reading out param again.");
272272

273273
cmd.Parameters.Clear();
274274
cmd.CommandType = CommandType.Text;
275275
cmd.CommandText = "select * from " + tableName;
276276
using (SqlDataReader reader = cmd.ExecuteReader())
277277
{
278-
string expectedValue = " newcity, p.X = 100, p.Y = 100, p.Distance() = 141.42135623731" + Environment.NewLine;
278+
string expectedValue = " newcity, p.X = 100, p.Y = 100, p.Distance() = 141.4213562373095" + Environment.NewLine;
279279
DataTestUtility.AssertEqualsWithDescription(
280280
expectedValue, UdtTestHelpers.DumpReaderString(reader, false),
281281
"Unexpected reader dump string.");
@@ -305,7 +305,7 @@ public void UDTFields_WrongType()
305305
"beaverton", reader.GetValue(0),
306306
"Unexpected reader value.");
307307
DataTestUtility.AssertEqualsWithDescription(
308-
"14.8660687473185", ((Point)reader.GetValue(1)).Distance().ToString(),
308+
"14.866068747318506", ((Point)reader.GetValue(1)).Distance().ToString(),
309309
"Unexpected distance value.");
310310

311311
reader.Read();
@@ -359,13 +359,13 @@ public void Reader_PointEarly()
359359
"FieldType[1] = Point" + Environment.NewLine +
360360
" redmond, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
361361
" bellevue, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
362-
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
362+
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
363363
" portland, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
364364
" LA, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
365365
" SFO, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
366-
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
366+
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
367367
" new york, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
368-
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.0156211871642" + Environment.NewLine;
368+
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.01562118716424" + Environment.NewLine;
369369

370370
using (SqlDataReader reader = cmd.ExecuteReader())
371371
{
@@ -403,14 +403,14 @@ public void Reader_LineEarly()
403403
"Unexpected reader values.");
404404

405405
string expectedLineValues =
406-
"1, IsNull = False, Length = 2.82842712474619" + Environment.NewLine +
407-
"2, IsNull = False, Length = 2.82842712474619" + Environment.NewLine +
408-
"3, IsNull = False, Length = 9.8488578017961" + Environment.NewLine +
409-
"4, IsNull = False, Length = 214.107449660212" + Environment.NewLine +
410-
"5, IsNull = False, Length = 2.82842712474619" + Environment.NewLine +
411-
"6, IsNull = False, Length = 2.82842712474619" + Environment.NewLine +
412-
"7, IsNull = False, Length = 9.8488578017961" + Environment.NewLine +
413-
"8, IsNull = False, Length = 214.107449660212" + Environment.NewLine;
406+
"1, IsNull = False, Length = 2.8284271247461903" + Environment.NewLine +
407+
"2, IsNull = False, Length = 2.8284271247461903" + Environment.NewLine +
408+
"3, IsNull = False, Length = 9.848857801796104" + Environment.NewLine +
409+
"4, IsNull = False, Length = 214.1074496602115" + Environment.NewLine +
410+
"5, IsNull = False, Length = 2.8284271247461903" + Environment.NewLine +
411+
"6, IsNull = False, Length = 2.8284271247461903" + Environment.NewLine +
412+
"7, IsNull = False, Length = 9.848857801796104" + Environment.NewLine +
413+
"8, IsNull = False, Length = 214.1074496602115" + Environment.NewLine;
414414

415415
builder = new StringBuilder();
416416
while (reader.Read())
@@ -454,13 +454,13 @@ public void Reader_PointLate()
454454
"FieldType[1] = Point" + Environment.NewLine +
455455
" redmond, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
456456
" bellevue, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
457-
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
457+
" seattle, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
458458
" portland, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
459459
" LA, p.X = 3, p.Y = 3, p.Distance() = 5" + Environment.NewLine +
460460
" SFO, p.X = 6, p.Y = 6, p.Distance() = 10" + Environment.NewLine +
461-
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.8660687473185" + Environment.NewLine +
461+
" beaverton, p.X = 10, p.Y = 10, p.Distance() = 14.866068747318506" + Environment.NewLine +
462462
" new york, p.X = 20, p.Y = 20, p.Distance() = 25" + Environment.NewLine +
463-
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.0156211871642" + Environment.NewLine;
463+
" yukon, p.X = 20, p.Y = 20, p.Distance() = 32.01562118716424" + Environment.NewLine;
464464

465465
DataTestUtility.AssertEqualsWithDescription(
466466
expectedReaderValues, UdtTestHelpers.DumpReaderString(reader),

0 commit comments

Comments
 (0)