root/root-longlong.patch
Mattias Ellert 2f8e3d96d1 Update to 6.24.04
New subpackages: root-roofit-common, root-roofit-dataframe-helpers,
  root-roofit-hs3, root-tmva-sofie and root-tmva-sofie-parser
Removed subpackages: root-memstat and root-montecarlo-vmc
Drop the doxygen generated root-doc package (doxygen runs out of memory)
Dropped patches: 17
New patches: 22
Updated patches: 5
2022-04-05 14:39:21 +02:00

52 lines
1.9 KiB
Diff

From 7fe5ef049baf614626d985b05cb0b335f9764a3c Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 24 Mar 2022 16:15:00 +0100
Subject: [PATCH] Fix test when long is 32 bits
This test tests support for 64 bit values. But it uses a long type,
which fails on platforme where a long is 32 bits.
This commit changes the test to use a long long type instead.
---
tree/dataframe/test/dataframe_snapshot.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tree/dataframe/test/dataframe_snapshot.cxx b/tree/dataframe/test/dataframe_snapshot.cxx
index 05354e83d5..a30440558e 100644
--- a/tree/dataframe/test/dataframe_snapshot.cxx
+++ b/tree/dataframe/test/dataframe_snapshot.cxx
@@ -470,11 +470,11 @@ void ReadWriteCarray(const char *outFileNameBase)
auto size = 0;
int v[maxArraySize];
bool vb[maxArraySize];
- long int vl[maxArraySize];
+ long long int vl[maxArraySize];
t.Branch("size", &size, "size/I");
t.Branch("v", v, "v[size]/I");
t.Branch("vb", vb, "vb[size]/O");
- t.Branch("vl", vl, "vl[size]/G");
+ t.Branch("vl", vl, "vl[size]/L");
// Size 1
size = 1;
@@ -518,7 +518,7 @@ void ReadWriteCarray(const char *outFileNameBase)
TTreeReader r(treename, &f2);
TTreeReaderArray<int> rv(r, "v");
TTreeReaderArray<bool> rvb(r, "vb");
- TTreeReaderArray<long int> rvl(r, "vl");
+ TTreeReaderArray<long long int> rvl(r, "vl");
// Size 1
EXPECT_TRUE(r.Next());
@@ -571,7 +571,7 @@ void ReadWriteCarray(const char *outFileNameBase)
const auto outfname2 = outFileNameBaseStr + "_out2.root";
RDataFrame(treename, fname)
- .Snapshot<int, RVec<int>, RVec<bool>, RVec<long int>>(treename, outfname2, {"size", "v", "vb", "vl"});
+ .Snapshot<int, RVec<int>, RVec<bool>, RVec<long long int>>(treename, outfname2, {"size", "v", "vb", "vl"});
outputChecker(outfname2.c_str());
gSystem->Unlink(fname.c_str());
--
2.35.1