| 685 | } |
| 686 | |
| 687 | func TestStringEqual(t *testing.T) { |
| 688 | for i, currCase := range []struct { |
| 689 | equalWant string |
| 690 | equalGot string |
| 691 | msgAndArgs []interface{} |
| 692 | want string |
| 693 | }{ |
| 694 | {equalWant: "hi, \nmy name is", equalGot: "what,\nmy name is", want: "\tassertions.go:\\d+: \n\t+Error Trace:\t\n\t+Error:\\s+Not equal:\\s+\n\\s+expected: \"hi, \\\\nmy name is\"\n\\s+actual\\s+: \"what,\\\\nmy name is\"\n\\s+Diff:\n\\s+-+ Expected\n\\s+\\++ Actual\n\\s+@@ -1,2 \\+1,2 @@\n\\s+-hi, \n\\s+\\+what,\n\\s+my name is"}, |
| 695 | } { |
| 696 | mockT := &bufferT{} |
| 697 | Equal(mockT, currCase.equalWant, currCase.equalGot, currCase.msgAndArgs...) |
| 698 | Regexp(t, regexp.MustCompile(currCase.want), mockT.buf.String(), "Case %d", i) |
| 699 | } |
| 700 | } |
| 701 | |
| 702 | func TestEqualFormatting(t *testing.T) { |
| 703 | for i, currCase := range []struct { |