Skip to content

Simplify the postprocessing of cling/array/array1test - not enough to… #759

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cling/array/array1.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
typedef unsigned long l_size_t; const int n1 = 1;
TString a1[n1];
#ifdef ClingWorkAroundPrintfIssues
fprintf(stderr,"a1 is 0x%lx 0x%lx\n",(l_size_t)a1,(l_size_t)&(a1[0]));
fprintf(stderr,"a1 is %s %s\n",((l_size_t)a1) ? "not_null" : "null",((l_size_t)&(a1[0])) ? "not_null" : "null");
#else
fprintf(stdout,"a1 is 0x%lx 0x%lx\n",(l_size_t)a1,(l_size_t)&(a1[0]));
fprintf(stdout,"a1 is %s %s\n",((l_size_t)a1) ? "not_null" : "null",((l_size_t)&(a1[0])) ? "not_null" : "null");
#endif
const int n2 = 2;
TString a2[n2];
TString a2[n2];
#ifdef ClingWorkAroundPrintfIssues
fprintf(stderr,"a2 is 0x%lx 0x%lx\n",(l_size_t)a2,(l_size_t)&(a2[0]));
fprintf(stderr,"a2 is %s %s\n",((l_size_t)a2) ? "not_null" : "null",((l_size_t)&(a2[0])) ? "not_null" : "null");
#else
fprintf(stdout,"a2 is 0x%lx 0x%lx\n",(l_size_t)a2,(l_size_t)&(a2[0]));
fprintf(stdout,"a2 is %s %s\n",((l_size_t)a2) ? "not_null" : "null",((l_size_t)&(a2[0])) ? "not_null" : "null");
#endif
gROOT->ProcessLine(".g a1");
gROOT->ProcessLine(".g a2");
}
}
8 changes: 4 additions & 4 deletions cling/array/array1test.ref
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Processing runarray1test.C...
a1 is
a2 is
array1.C 3 TString a1[1]=
array1.C 10 TString a2[2]=
a1 is not_null not_null
a2 is not_null not_null
array1.C 4 (address: NA) class TString a1[1], size =
array1.C 11 (address: NA) class TString a2[2], size =
4 changes: 1 addition & 3 deletions cling/array/array1test_convert.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
sed -e 's/0x[^ ]*//g' -e 's/[A-Za-z]:.*array1.C/array1.C/g' \
-e 's/(address: NA) class/ /' -e 's/, size = .*/=/' \
-e 's/input_line_[0-9]*/array1.C/' -e 's/ 4 / 3 /' -e 's/ 11 / 10 /'
sed -e 's/, size = .*/, size =/' \