Last active
April 22, 2023 21:02
-
-
Save fraxedas/aa49b3d61362d3ff5bdbc3ebd21855dc to your computer and use it in GitHub Desktop.
Poor's man test framework.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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