Skip to content

Add test for reading Long64_t values - #423

Merged
linev merged 1 commit into
root-project:devfrom
Prafyl:test-ntoi8-negative
Oct 12, 2026
Merged

linev merged 1 commit into
root-project:devfrom
Prafyl:test-ntoi8-negative

Conversation

@Prafyl

@Prafyl Prafyl commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

This Pull request:

adds the CI test asked for in #422.

Changes:

  • demo/node/tree_int64_test.root - small tree (5.5 KB) with one Long64_t branch, 14 entries: 0, ±1, -2, -2^31, -2^32, -2^32-1, -5e9, -(2^53-1), -2^53, INT64_MIN, 2^32, 2^53-1, INT64_MAX
  • demo/node/tree_int64_test.cxx - macro that makes the file (ROOT 6.40)
  • demo/node/tree_int64_test.js - reads the branch with treeProcess and compares every entry to the expected value. on any mismatch it prints FAILURE and does process.exit(1) so the CI job actually goes red
  • added the test to the linux, macos and windows jobs in jsroot-ci.yml, right after rntuple_test.js

i checked it both ways. on current master all 14 entries pass. with the old ntoi8() put back it fails on 4 of them (-2^32 reads as 0, the two values near -2^53 and INT64_MIN are off by 2^32) and exits with 1.

tree_int64_test.root has a Long64_t branch with values around the 2^32 and
2^53 boundaries and INT64_MIN/MAX, written by tree_int64_test.cxx with ROOT 6.40.
tree_int64_test.js reads them back and exits with an error on any mismatch.
Covers the ntoi8 fix from root-project#422.
@linev
linev changed the base branch from master to dev October 12, 2026 08:31
@linev linev self-assigned this Oct 12, 2026
@linev

linev commented Oct 12, 2026

Copy link
Copy Markdown
Member

Thanks!

Exactly that we need.

@linev
linev merged commit c35101a into root-project:dev Oct 12, 2026
17 of 18 checks passed
@Prafyl

Prafyl commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Glad I could contribute a small part in such a prestigious project. Thanks for the review and merge!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants