Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for VbiDecoder #396

Merged
merged 6 commits into from
Jan 2, 2020
Merged

Conversation

atsampson
Copy link
Collaborator

Add unit tests for VbiDecoder (which are now run by the CI), and fix some minor problems they revealed:

  • Don't assume a disc is CAV until we've seen a code indicating that.
  • Fix the programme status code parity check - I believe this works for Amendment 2 codes too.
  • Check BCD digits are valid in all the codes that use BCD - I've added a helper function for this.
  • Don't store invalid user codes.

I've added tests for several of the oddities we've seen on real discs, but if anyone's got any more it'd be easy enough to add them.

For example, a field containing only lead-out codes shouldn't be
reported as either CAV or CLV.
This includes some tests (#if 0-d out) that don't currently pass.
A copy-and-paste error meant that parity wasn't being checked correctly
for two of the X5 bits.
This means that all the VBI codes that use BCD now check whether all the
digits are valid.
@atsampson atsampson added enhancement ld-decode-tools An issue only affecting the ld-decode-tools labels Jan 2, 2020
@simoninns
Copy link
Collaborator

Gave the code a quick browse through; changes look like a nice improvement in readability and the like, thanks!

@simoninns simoninns merged commit d003ce1 into happycube:master Jan 2, 2020
@atsampson atsampson deleted the testvbidecoder branch January 6, 2020 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants