PowerShell/test/powershell/engine/Basic
Joel Sallow (/u/ta11ow) b34e331d63 Consider DBNull.Value and NullString.Value the same as $null when comparing with $null and casting to bool (#9794)
- Adds `LanguagePrimitives.IsNullLike()` method to account for `DBNull.Value` and `NullString.Value` so that they can be considered the same as a null value where sensible in PowerShell.
- Updates `-ne` and `-eq` binders to treat `DBNull.Value` and `NullString.Value` as equal to null/AutomationNull.
- Update code paths for comparing objects in LanguagePrimitives to ensure consistency with how the `-eq` and `-ne` binders work when calling LanguagePrimitives methods to do the comparisons.
- Make `LanguagePrimitives.IsNull()` and `LanguagePrimitives.IsNullLike()` public methods.
- Added tests for null behaviours in `NullRepresentatives.Tests.ps1`
2019-06-28 11:39:34 -07:00
..
Assembly.LoadFrom.Tests.ps1 Blacklist System.Windows.Forms form loaded to prevent a crash (#6822) 2018-05-07 16:38:27 -07:00
Assembly.LoadWithPartialName.Tests.ps1 Port PowerShell to .NET Core 3.0 (#9597) 2019-05-21 13:43:51 +08:00
Attributes.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00
CommandDiscovery.Tests.ps1 Fix use of Start-Process http://bing.com (#9793) 2019-06-04 14:36:12 -07:00
Credential.Tests.ps1 Use new Pester syntax: -Parameter for Pester tests in engine. (#6298) 2018-03-14 12:13:32 -07:00
DefaultCommands.Tests.ps1 New New-PSBreakpoint cmdlet & new -Breakpoint parameter for Debug-Runspace (#8923) 2019-04-13 19:14:53 -07:00
Encoding.Tests.ps1 Allow numeric Ids and name of registered code pages in '-Encoding' parameters (#7636) 2018-09-19 18:53:03 +05:00
PropertyAccessor.Tests.ps1 Update use of "PowerShell Core" to just "PowerShell" (#9513) 2019-05-10 15:34:27 -07:00
ProxyCommand.tests.ps1 Add support for ValidateRangeKind to ParameterMetadata.GetProxyAttributeData (#9059) 2019-05-07 12:15:38 -07:00
SemanticVersion.Tests.ps1 Consider DBNull.Value and NullString.Value the same as $null when comparing with $null and casting to bool (#9794) 2019-06-28 11:39:34 -07:00
TypeResolution.Tests.ps1 Port PowerShell to .NET Core 3.0 (#9597) 2019-05-21 13:43:51 +08:00
ValidateAttributes.Tests.ps1 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682) 2018-05-17 14:42:04 -07:00