mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Make nullable warnings a per file opt-in (#1842)
* Make nullable warnings a per file opt-in * Remove unneeded compiler directives * Remove compiler directive for User Data
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlTypes;
|
||||
@@ -157,10 +159,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
|
||||
|
||||
public void Int16([Values(
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
short.MinValue // Negative two byte number
|
||||
)] short value)
|
||||
{
|
||||
@@ -169,10 +171,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
|
||||
[Test]
|
||||
public void Int32([Values(
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
short.MinValue, // Negative two byte number
|
||||
int.MaxValue, // Four byte number
|
||||
int.MinValue // Negative four byte number
|
||||
@@ -183,10 +185,10 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
|
||||
[Test]
|
||||
public void Int64([Values(
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
0,
|
||||
10,
|
||||
-10,
|
||||
short.MaxValue, // Two byte number
|
||||
short.MinValue, // Negative two byte number
|
||||
int.MaxValue, // Four byte number
|
||||
int.MinValue, // Negative four byte number
|
||||
@@ -236,12 +238,12 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
|
||||
[Test]
|
||||
public void Single([Values(
|
||||
0,
|
||||
10.1F,
|
||||
-10.1F,
|
||||
float.MinValue,
|
||||
float.MaxValue,
|
||||
float.PositiveInfinity,
|
||||
0,
|
||||
10.1F,
|
||||
-10.1F,
|
||||
float.MinValue,
|
||||
float.MaxValue,
|
||||
float.PositiveInfinity,
|
||||
float.NegativeInfinity
|
||||
)] float value)
|
||||
{
|
||||
@@ -250,16 +252,16 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
|
||||
[Test]
|
||||
public void Double([Values(
|
||||
0,
|
||||
10.1,
|
||||
-10.1,
|
||||
float.MinValue,
|
||||
float.MaxValue,
|
||||
float.PositiveInfinity,
|
||||
0,
|
||||
10.1,
|
||||
-10.1,
|
||||
float.MinValue,
|
||||
float.MaxValue,
|
||||
float.PositiveInfinity,
|
||||
float.NegativeInfinity,
|
||||
double.PositiveInfinity,
|
||||
double.NegativeInfinity,
|
||||
double.MinValue,
|
||||
double.PositiveInfinity,
|
||||
double.NegativeInfinity,
|
||||
double.MinValue,
|
||||
double.MaxValue
|
||||
)]double value)
|
||||
{
|
||||
@@ -577,11 +579,11 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution.DataStorage
|
||||
[Test]
|
||||
public void GuidTest()
|
||||
{
|
||||
foreach (var testValue in GuidTestParameters)
|
||||
{
|
||||
VerifyReadWrite(testValue.ToByteArray().Length + 1, testValue,
|
||||
(writer, val) => writer.WriteGuid(testValue),
|
||||
(reader, rowId) => reader.ReadGuid(0, rowId));
|
||||
foreach (var testValue in GuidTestParameters)
|
||||
{
|
||||
VerifyReadWrite(testValue.ToByteArray().Length + 1, testValue,
|
||||
(writer, val) => writer.WriteGuid(testValue),
|
||||
(reader, rowId) => reader.ReadGuid(0, rowId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user