Created
November 17, 2022 01:07
-
-
Save metarsit/0c4e5eb4173b67e326514ba16e41f68d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var tcs = GenerateTestCasesForEqual(100000) | |
| func TestEqualA(t *testing.T) { | |
| for i, tc := range tcs { | |
| t.Run(fmt.Sprintf("Test Case %d", i+1), func(t *testing.T) { | |
| result := Equal(tc.a, tc.b) | |
| if result != tc.expect { | |
| t.Fatalf("test case number %d failed", i) | |
| } | |
| }) | |
| } | |
| } | |
| func TestEqualB(t *testing.T) { | |
| for i, tc := range tcs { | |
| t.Run(fmt.Sprintf("Test Case %d", i+1), func(t *testing.T) { | |
| result := Equal(tc.a, tc.b) | |
| if result != tc.expect { | |
| t.Fatalf("test case number %d failed", i) | |
| } | |
| }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment