Abort test if error occurs

This commit is contained in:
Hiroshi Muramatsu 2018-07-10 08:57:16 +10:00
parent 18481ea7e8
commit 21c3b4323e

View File

@ -118,7 +118,7 @@ func TestNewStandard14Font(t *testing.T) {
t.Fatalf("%s: failed to get glyph metric", in) t.Fatalf("%s: failed to get glyph metric", in)
} }
if metrics.Wx != expect.Wx || metrics.Wy != expect.Wy { if metrics.Wx != expect.Wx || metrics.Wy != expect.Wy {
t.Errorf("%s: expected glyph metrics is Wx=%f Wy=%f, but got Wx=%f Wy=%f", t.Fatalf("%s: expected glyph metrics is Wx=%f Wy=%f, but got Wx=%f Wy=%f",
in, expect.Wx, expect.Wy, metrics.Wx, metrics.Wy) in, expect.Wx, expect.Wy, metrics.Wx, metrics.Wy)
} }
} }