Skip to content

Instantly share code, notes, and snippets.

@fraxedas
Last active April 22, 2023 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fraxedas/aa49b3d61362d3ff5bdbc3ebd21855dc to your computer and use it in GitHub Desktop.
Save fraxedas/aa49b3d61362d3ff5bdbc3ebd21855dc to your computer and use it in GitHub Desktop.
Poor's man test framework.
public class Assert{
public static void AreEquals(int[] first, int[] second) {
// Compare
var equals = first.SequenceEqual(second);
// String representation
var firstText = $"[{string.Join(",", first)}]";
var secondText = $"[{string.Join(",", second)}]";
// Write the output to the console
if(equals){
Console.Write("✅\t\t");
}
else{
Console.Write("❌\t\t");
}
Console.WriteLine($"{firstText} == {secondText}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment