mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-24 08:18:52 -03:00
generator: mode debug output in case of failure
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
parent
b0f94ad693
commit
3a5f4b2db1
@ -302,6 +302,12 @@ func (s *GeneratorTestSuite) TestGenerationFiles() {
|
|||||||
expected := normalizeSpaces(string(gold))
|
expected := normalizeSpaces(string(gold))
|
||||||
actual := normalizeSpaces(string(out))
|
actual := normalizeSpaces(string(out))
|
||||||
assert.Equal(s.T(), expected, actual, "Test %s", test.name)
|
assert.Equal(s.T(), expected, actual, "Test %s", test.name)
|
||||||
|
if expected != actual {
|
||||||
|
s.T().Logf("%s generated is different from %q", test.name, test.wantOut)
|
||||||
|
s.T().Logf("Expected %q", expected[:400])
|
||||||
|
s.T().Logf("Actual %q", actual[:400])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user