RazrFalcon / tiny-skia

A tiny Skia subset ported to Rust
BSD 3-Clause "New" or "Revised" License
1.05k stars 67 forks source link

Enable testing of no-std-float feature #60

Closed jamessan closed 1 year ago

jamessan commented 1 year ago

I'm in the process of packaging this for Debian, and by default we run tests for each feature in isolation. This didn't work for the no-std-float feature, since many of the tests/examples rely on png-format.

This PR applies feature guards to the tests that rely on png-format, as well as declaring the png-format feature as required for the relevant examples (currently all of them).

GH CI is also updated to run the tests for no-std-float, rather than just building it, to keep this clean going forward.

CryZe commented 1 year ago

Pretty sure since the tests always use std, this doesn't actually test the feature in any meaningful way. I guess it also doesn't hurt though.

RazrFalcon commented 1 year ago

and by default we run tests for each feature in isolation

You should simply skip it then. There is nothing to test when png is not enabled. You're effectively not testing anything. This is why I'm only trying to build no-std, not actually test it.

Anyway, I will not accept this patch. It's way too significant and I do not plan to support this use case. You should handle it on your side.

jamessan commented 1 year ago

You should simply skip it then. There is nothing to test when png is not enabled.

Right, I see that now. I misunderstood the feature breakdown. Thanks for clearing that up.