Stranger6667 / jsonschema-experimental

MIT License
2 stars 1 forks source link

The `assert_array_iter` test is unclear #2

Closed TieWay59 closed 6 months ago

TieWay59 commented 6 months ago

https://github.com/Stranger6667/jsonschema/blob/d6b19381a7f38ac560d842ece5aad6f4892a4320/crates/jsonlike/src/lib.rs#L220-L221

This test assumes the array is an integer array, and contains a 1 in the beginning. But this is a little over what the test name conveys.

Since this test is used in another crate in this package. I prefer to give it a better name or remove the "value check" contained in it.

Stranger6667 commented 6 months ago

Agree, I think I'd give more descriptive names for assert_array_iter & assert_object_iter

Stranger6667 commented 6 months ago

Adjusted in 748b9690b45758e45798a99cf0e221fabddc8a33