From a117559063df7553f607a65a0a39afc4d9317d3c Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Tue, 26 Jun 2018 10:05:53 +0200 Subject: [PATCH] Minor formatting tweaks --- Resources/PostBuild.ps1 | 10 ++++++---- lib/TweetTest.Unit/Data/TestResult.fs | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Resources/PostBuild.ps1 b/Resources/PostBuild.ps1 index 06a28a0f..50b42fe9 100644 --- a/Resources/PostBuild.ps1 +++ b/Resources/PostBuild.ps1 @@ -9,14 +9,13 @@ $ErrorActionPreference = "Stop" try{ $sw = [Diagnostics.Stopwatch]::StartNew() - Write-Host "--------------------------" if ($version.Equals("")){ $version = (Get-Item (Join-Path $targetDir "TweetDuck.exe")).VersionInfo.FileVersion } + Write-Host "--------------------------" Write-Host "TweetDuck version" $version - Write-Host "--------------------------" # Cleanup @@ -62,7 +61,7 @@ try{ } if ((Get-Content -Path $file -Raw).Contains("`r")){ - Throw "$file cannot contain carriage return" + Throw "$file must not have any carriage return characters" } Write-Host "Verified" $file.Substring($targetDir.Length) @@ -116,10 +115,13 @@ try{ Rewrite-File $file $lines } - Write-Host "------------------" + # Finished + $sw.Stop() + Write-Host "------------------" Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms" Write-Host "------------------" + }catch{ Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber Write-Host $_ diff --git a/lib/TweetTest.Unit/Data/TestResult.fs b/lib/TweetTest.Unit/Data/TestResult.fs index a5c5d646..975740b1 100644 --- a/lib/TweetTest.Unit/Data/TestResult.fs +++ b/lib/TweetTest.Unit/Data/TestResult.fs @@ -13,11 +13,11 @@ module TestResult_WithValue = Assert.True(result.HasValue) [<Fact>] - let ``Accessing Value returns the provided value`` () = + let ``accessing Value returns the provided value`` () = Assert.Equal(10, result.Value) [<Fact>] - let ``Accessing Exception throws`` () = + let ``accessing Exception throws`` () = Assert.Throws<InvalidOperationException>(fun () -> result.Exception |> ignore) [<Fact>] @@ -39,11 +39,11 @@ module TestResult_WithException = Assert.False(result.HasValue) [<Fact>] - let ``Accessing Value throws`` () = + let ``accessing Value throws`` () = Assert.Throws<InvalidOperationException>(fun () -> result.Value |> ignore) [<Fact>] - let ``Accessing Exception returns the provided exception`` () = + let ``accessing Exception returns the provided exception`` () = Assert.IsType<IndexOutOfRangeException>(result.Exception) [<Fact>]