mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
996 stars 183 forks source link

DiffPaneModel could report pass/fail #58

Closed daveyostcom closed 4 years ago

daveyostcom commented 4 years ago

I'm using DiffPlex to show differences when a unit test fails. Thank you!

For such uses, a property like this would be convenient in DiffPaneModel:

bool HasDifferences { get; }

Workaround is to first check if the strings are equal and call diff only if they're not.

mmanela commented 4 years ago

Interesting suggestion, would you be interested contributing?

daveyostcom commented 4 years ago

Sorry, can't.

michasacuer commented 4 years ago

Have same issue as @daveyostcom . That property would be amazing. @mmanela i can contribute if u wish :) Do you have any slack or other for this project?

mmanela commented 4 years ago

@michasacuer I don't have a slack but we can use this item to discuss if that works

michasacuer commented 4 years ago

Cool, if i will have questions i will post it here :)

michasacuer commented 4 years ago

Im allowd to use Linq?

daveyostcom commented 4 years ago

Erik Meijer when asked what features of C# aren't used enough, answered LINQ and async/await. That was a while ago. 😎

mmanela commented 4 years ago

Linq is great!

daveyostcom commented 4 years ago

DiffPlex is a great way to show test failures! While we're on the subject of diffing actual vs expected in test results,

Whereas +/–/␠ and green/red/grey work well to show new/old/same versions, when they are used to indicate actual vs expected test results, they are not so successful because they incur a cognitive load. Quick:

I think this solution removes the cognitive load nicely.

  0 0.0
√ 1 1.0
x 1 0.1
  2 2.0
√ 3 3.0
  4 4.0
  5 4.1
x 6 4.2

I couldn't find a better Unicode checkmark that works reliably in monospaced fonts.

michasacuer commented 4 years ago

@mmanela i have a question, when you push new release on nuget (with has differences)?

mmanela commented 4 years ago

@michasacuer I just published 1.6.2