soenkehahn / string-conversions

Simplifies dealing with different types for strings
BSD 3-Clause "New" or "Revised" License
26 stars 6 forks source link

Expand the tests #26

Open mordae opened 2 years ago

mordae commented 2 years ago

They now cover all combinations that should round-trip safely and all possible combinations of conversions to make sure nothing ever throws an exception.

soenkehahn commented 2 years ago

@mordae: I also merged #22 now, so we should have working CI (hopefully). If you push a new commit to this branch it should run.

mordae commented 2 years ago

I've restructured the tests so that they now:

  1. Verify the identities
  2. Verify known-safe round-trips (Unicode -> Unicode -> Unicode and Unicode -> Bytes -> Unicode)
  3. Verify crash-safety of the remaining conversions

Is this what you had in mind?

soenkehahn commented 2 years ago

Is this what you had in mind?

Not exactly. What I would like to have is further nested subsections in the test-suite (using either describe or context) to group the tests:

Since there's a bit of a combinatorial explosion going on in this package that we have to manage manually, I'd like to keep things as organized as possible.

Let me know if this is not clear, then I can come up with a commit myself.

soenkehahn commented 2 years ago

@mordae: Thanks for pushing again! That's exactly what I meant.

I put another commit into the PR (1bb25f67). Does that one look good to you? If yes, I'll merge.