Skip to content

Conversation

@jack-pappas
Copy link
Contributor

Re-implemented the way the test which compares actual vs. expected surface area works, so that when they don't match exactly, the output only displays the members which don't match. The new output message also shows which members were "unexpectedly present" and "unexpectedly missing", which makes it easier to diagnose the cause of the test failure.

Re-implemented the way the test which compares actual vs. expected
surface area works, so that when they don't match exactly, the output
only displays the members which don't match. The new output message
also shows which members were "unexpectedly present" and
"unexpectedly missing", which makes it easier to diagnose the cause
of the test failure.
Copy link
Contributor

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot ... I love this.

@KevinRansom
Copy link
Contributor

Check out an intentional difference in the surface area caught by this test:

Errors and Failures

1) Failed : FSharp.Core.Unittests.SurfaceArea.SurfaceAreaTest.VerifyArea
Assembly: FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Expected and actual surface area don't match. To see the delta, run:
    windiff c:\microsoft\visualfsharp\src\fsharp\FSharp.Core.Unittests\SurfaceArea.net40.fs c:\microsoft\visualfsharp\release\net40\bin\CoreUnit_net40_Xml.xml

Unexpectedly missing (expected, not actual):
    Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T)

Unexpectedly present (actual, not expected):
    Microsoft.FSharp.Collections.ArrayModule: T[] Replucate[T](Int32, T)
at FSharp.Core.Unittests.LibraryTestFx.SurfaceArea.verify(String expected, String platform, String fileName) in c:\microsoft\visualfsharp\src\fsharp\FSharp.Core.Unittests\LibraryTestFx.fs:line 176

@KevinRansom KevinRansom merged commit 1a5b23d into dotnet:master Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants