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

Write unit tests #30

Open
9 of 16 tasks
dktapps opened this issue Feb 6, 2018 · 1 comment
Open
9 of 16 tasks

Write unit tests #30

dktapps opened this issue Feb 6, 2018 · 1 comment
Assignees

Comments

@dktapps
Copy link
Member

dktapps commented Feb 6, 2018

incomplete list of things that should be tested:

  • CompoundTag/ListTag API
    • iterating in foreach
    • getValue()
    • getters and setters
    • array-access API (yuck)
    • count()ing tags (even things as simple as that can be botched, see da884fe)
    • tag[] = value syntax should not be allowed (CompoundTags are effectively maps)
  • ListTag-only API
    • push(), pop(), etc (once ListTag refactor #33 is done)
    • automatic detection of tag type when list is of type TAG_End
    • assigning wrong tag type to list that is not of type TAG_End (should throw exception)
    • setting tag type manually (should only be allowed when list is empty)
    • appending tags using list[] = tag syntax
    • type checking for adding new tags to lists
    • list[] = primitiveValue should throw exceptions
  • General NamedTag API
    • bounds checking for byte/short/int/long
    • setName()/getName()
    • creating tags with and without preset values

This does not currently cover any of the streams API (TODO).

@dktapps dktapps self-assigned this Feb 8, 2018
@dktapps
Copy link
Member Author

dktapps commented Jan 8, 2019

There are currently no unit tests which test serialize API, which is a problem because this is quite a mission critical component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant