From 0425e245f0f6ce45979998c282d4b44e2c19cd89 Mon Sep 17 00:00:00 2001 From: Danilo Piparo Date: Fri, 20 Nov 2026 22:30:10 +0100 Subject: [PATCH] [test] Check value printer and type_index at the prompt --- roottest/root/rint/CMakeLists.txt | 7 +++++++ roottest/root/rint/valPrinterTypeId.C | 5 +++++ roottest/root/rint/valPrinterTypeId.ref | 2 ++ roottest/root/rint/valPrinterTypeId_win32.ref | 2 ++ roottest/root/rint/valPrinterTypeId_win64.ref | 2 ++ 5 files changed, 18 insertions(+) create mode 100644 roottest/root/rint/valPrinterTypeId.C create mode 100644 roottest/root/rint/valPrinterTypeId.ref create mode 100644 roottest/root/rint/valPrinterTypeId_win32.ref create mode 100644 roottest/root/rint/valPrinterTypeId_win64.ref diff --git a/roottest/root/rint/CMakeLists.txt b/roottest/root/rint/CMakeLists.txt index 17951aed0895b..c2ddfeda853c3 100644 --- a/roottest/root/rint/CMakeLists.txt +++ b/roottest/root/rint/CMakeLists.txt @@ -69,3 +69,10 @@ ROOTTEST_ADD_TEST(fileBeforeCommand COPY_TO_BUILDDIR t_ddsimUserPlugins.root FAILREGEX "undeclared identifier 'EVENT'" PASSRC 10) + +# issue 14198 +if(NOT (APPLE AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")) + ROOTTEST_ADD_TEST(valPrinterTypeId + MACRO valPrinterTypeId.C + OUTREF valPrinterTypeId${ref_suffix}) +endif() \ No newline at end of file diff --git a/roottest/root/rint/valPrinterTypeId.C b/roottest/root/rint/valPrinterTypeId.C new file mode 100644 index 0000000000000..2d12bbb1afe5c --- /dev/null +++ b/roottest/root/rint/valPrinterTypeId.C @@ -0,0 +1,5 @@ +void valPrinterTypeId() +{ + gInterpreter->ProcessLine("std::type_index(typeid(TObject)).name()"); + gInterpreter->ProcessLine("std::type_index(typeid(int)).name()"); +} diff --git a/roottest/root/rint/valPrinterTypeId.ref b/roottest/root/rint/valPrinterTypeId.ref new file mode 100644 index 0000000000000..1e298afef938d --- /dev/null +++ b/roottest/root/rint/valPrinterTypeId.ref @@ -0,0 +1,2 @@ +(const char *) "7TObject" +(const char *) "i" diff --git a/roottest/root/rint/valPrinterTypeId_win32.ref b/roottest/root/rint/valPrinterTypeId_win32.ref new file mode 100644 index 0000000000000..50a9cc6f2be43 --- /dev/null +++ b/roottest/root/rint/valPrinterTypeId_win32.ref @@ -0,0 +1,2 @@ +(const char *) "class TObject" +(const char *) "int" diff --git a/roottest/root/rint/valPrinterTypeId_win64.ref b/roottest/root/rint/valPrinterTypeId_win64.ref new file mode 100644 index 0000000000000..50a9cc6f2be43 --- /dev/null +++ b/roottest/root/rint/valPrinterTypeId_win64.ref @@ -0,0 +1,2 @@ +(const char *) "class TObject" +(const char *) "int"