Open avitex opened 2 years ago
I might end up moving samples
to another folder while working on a more comprehensive test suite, but I'll leave it like this for now
Note the fonts are uploaded in the crate: https://docs.rs/crate/piet/latest/source/
Okay i think this makes sense, and is actually closer to a design we had previously, where we had a piet-test
crate. Maybe let's use that name, instead of 'samples', which sounds like something that might be interesting to users?
I'd also like a README in that folder, just explaining that these are a set of tests files that are run against backends for testing, and that the 'snapshots' submodule contains the expected outputs for different backends.
Otherwise thanks for taking the time to sort this out!
Note the fonts are uploaded in the crate: https://docs.rs/crate/piet/latest/source/
oh interesting that's definitely a mistake, I think they were ignored at some point but maybe they were moved.
Awesome, this is the line of thinking I'm going down too. I'll move it into piet-test
now and build out some more test stuff in there in following PRs
The reason I named it samples for the time being is it is close enough to examples, which I would look at for a sample of what I can output with the library. Moving all the stuff into piet-test
hides it away a little more
That's fair, but I think it's going to cause more confusion, since it isn't clear how to run these samples, and people have opened issues about that before. I'd prefer to avoid that confusion.
(I'd also like to move the test-picturer.s
file out of examples
and into bin
for each backend that runs the snapshots; I'd also rename it to "generate_snapshots.rs" or something)
(I'd also like to move the test-picture.rs file out of examples and into bin for each backend that runs the snapshots; I'd also rename it to "generate_snapshots.rs" or something)
This was almost exactly the next change I was going to propose ha!
Quick note perhaps for further discussion. If the sample_x
/generate_snapshots
was to be moved from examples
to bin
this then means piet-test
would have to be a published crate to be an optional dependency referenced within required-features
for the bin in Cargo.toml
. I instead choose to put them each in piet-test
for the time being to remove that dependency.
piet-test
is already a published crate... does this change your calculus at all?
piet
now no longer includes fonts within the crate published, making it smallerpiet::Error::InvalidSampleArgs
is removed, which is specific to samples