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 some unittest on get_buffer #889

Merged
merged 7 commits into from
Jun 17, 2024
Merged

Add some unittest on get_buffer #889

merged 7 commits into from
Jun 17, 2024

Commits on Jun 17, 2024

  1. Configuration menu
    Copy the full SHA
    c61e4cb View commit details
    Browse the repository at this point in the history
  2. Do not try to read out of reader in release mode.

    When building with the meson option `b_ndebug=true`
    (never set on our CI/CD), `ASSERT` macro is removed and so we stop
    testing that we are actually read in the reader range.
    
    Now we introduce `readImpl` which do the actual read
    (depending of implementation) and make `read` testing read range and call
    `readImpl` when everything is ok.
    mgautierfr committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    9888399 View commit details
    Browse the repository at this point in the history
  3. Correctly add override on all methods of *Reader.

    Adding few `override` only on `readImpl` now trigger warnings
    `inconsistent-missing-override`.
    
    Better to correctly add `override` when needed.
    mgautierfr committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    973d54b View commit details
    Browse the repository at this point in the history
  4. Correctly throw an exception if we fail to read in file.

    `FileReader` expects that `readAt` throws an exception if something goes
    wrong. So `readAt` must throw an exception instead of returning `-1`.
    mgautierfr committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    860581c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c540503 View commit details
    Browse the repository at this point in the history
  6. Fix reading of size >4GiB on Windows.

    ReadFile take a 32bits size. So we cannot blindly pass a 64bits size.
    Read by batch of 1GiB.
    mgautierfr committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    966a8d7 View commit details
    Browse the repository at this point in the history
  7. Use explicit size in test when reading integers.

    On Windows `long` is 32bits. It's better to use an explicit size.
    mgautierfr committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    e4cbe41 View commit details
    Browse the repository at this point in the history