Skip to content

FSFile interface is underspecified #62

@hakanai

Description

@hakanai

Trying to write tests for a new implementation of FSFile it's difficult to figure out what the expected behaviour should be for various inputs.

e.g.:

  • If fileOffset < 0, should it error? With what exception?
  • If fileOffset + dest.remaining() >= getLength(), should it read the data it can, and leave the buffer position at the end, or should it error?
  • If fileOffset >= getLength(), should it just do nothing, or error? With what exception?
  • If one of the above is true, but dest.remaining() == 0, should it succeed?
  • Are there other edge cases I haven't thought of?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions