From 7a971c50f6640424ff4a8fce874269fe183a2650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Mon, 20 May 2024 09:25:59 +0200 Subject: [PATCH 1/3] Update src/functions/assert/General/Should-NotHaveType.ps1 Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- src/functions/assert/General/Should-NotHaveType.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions/assert/General/Should-NotHaveType.ps1 b/src/functions/assert/General/Should-NotHaveType.ps1 index 85f8eeb55..762397371 100644 --- a/src/functions/assert/General/Should-NotHaveType.ps1 +++ b/src/functions/assert/General/Should-NotHaveType.ps1 @@ -14,8 +14,8 @@ .EXAMPLE ```powershell - "hello" | Should-NotHaveType [Int32] - 1 | Should-NotHaveType [String] + "hello" | Should-NotHaveType ([Int32]) + 1 | Should-NotHaveType ([String]) ``` These assertions will pass, because the actual value is not of the expected type. From a18e74682de6924a63436a3ef885f56123dd1197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Mon, 20 May 2024 22:05:46 +0200 Subject: [PATCH 2/3] Update src/functions/assert/General/Should-HaveType.ps1 Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- src/functions/assert/General/Should-HaveType.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions/assert/General/Should-HaveType.ps1 b/src/functions/assert/General/Should-HaveType.ps1 index 67f60364e..1ec6a24a9 100644 --- a/src/functions/assert/General/Should-HaveType.ps1 +++ b/src/functions/assert/General/Should-HaveType.ps1 @@ -14,8 +14,8 @@ .EXAMPLE ```powershell - "hello" | Should-HaveType [String] - 1 | Should-HaveType [Int32] + "hello" | Should-HaveType ([String]) + 1 | Should-HaveType ([Int32]) ``` These assertions will pass, because the actual value is of the expected type. From 1b3f0b5127ff0cb5d6af7a42666a71c0b90161ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Mon, 20 May 2024 22:07:41 +0200 Subject: [PATCH 3/3] Update src/functions/assert/Equivalence/Should-BeEquivalent.ps1 Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- src/functions/assert/Equivalence/Should-BeEquivalent.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/assert/Equivalence/Should-BeEquivalent.ps1 b/src/functions/assert/Equivalence/Should-BeEquivalent.ps1 index aa4aa8ecb..cb43f6f03 100644 --- a/src/functions/assert/Equivalence/Should-BeEquivalent.ps1 +++ b/src/functions/assert/Equivalence/Should-BeEquivalent.ps1 @@ -609,7 +609,7 @@ function Compare-Equivalent { return } - v "`$Expected is an object of type $$Expected.GetType(), we will be comparing `$Actual to objects." + v "`$Expected is an object of type $(Format-Nicely2 $Expected.GetType()), we will be comparing `$Actual to objects." Compare-ObjectEquivalent -Expected $Expected -Actual $Actual -Property $Path -Options $Options }