thscharler / spreadsheet-ods

Apache License 2.0
29 stars 6 forks source link

rewrite push_colname push_rowname #8

Closed RustyNixieTube closed 4 years ago

RustyNixieTube commented 4 years ago

rewrite in a more idiomatic way: pub(crate) fn push_colname(buf: &mut String, mut col: ucell); pub(crate) fn push_rowname(buf: &mut String, mut row: ucell);

add test for this two functions(compatibility with the old one)

correction of the overflow bug (fixes #6)

thscharler commented 4 years ago

I get

attempt to subtract with overflow thread 'refs::test_names' panicked at 'attempt to subtract with overflow', src efs.rs:719:39 stack backtrace:

thscharler commented 4 years ago

I'm not sure if your implementation does the same thing. Colnames have this encoding A-Z without zeroes, I don't see where your implementation catches this.

thscharler commented 4 years ago

as for pub(crate), I thought the way to do it is to write white box tests in the same module?