-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[roottest] use cmake for io/newstl tests, part 4 #19709
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cfbdc8d
[roottest] use cmake for io/newstl tests
linev 567c031
[roottest] fix compiler warnings in io/newstl/runbase.C script
linev 9cb5ce4
[roottest] link compiled macros in io/newstl tests
linev 55609f0
[roottest] add special ref file for Mac and Win for main root/io/news…
linev 0090a54
[rootest] use override syntax for classes in io/newstl
linev 2936143
[roottest] add linkdef for std::complex
linev cd8023a
[roottest] add windows ref files for io/newstl/ComplexTest
linev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,107 @@ | ||
| #------------------------------------------------------------------------------- | ||
| # | ||
| # Placeholder file to translate the tests to the new CTest system. Meanwhile we | ||
| # define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR} | ||
| # | ||
| #------------------------------------------------------------------------------- | ||
| ROOTTEST_ADD_OLDTEST(LABELS longtest) | ||
| ROOTTEST_COMPILE_MACRO(TestHelpers.C | ||
| FIXTURES_SETUP root-io-newstl-TestHelpers-fixture) | ||
|
|
||
| set(_holders rvecHolder vectorHolder dequeHolder listHolder setHolder multisetHolder mapHolder multimapHolder) | ||
| set(_tests rtest vtest dtest ltest stest ttest mtest ntest) | ||
|
|
||
| foreach(index RANGE 7) | ||
| list(GET _holders ${index} holder) | ||
| list(GET _tests ${index} test) | ||
| ROOTTEST_COMPILE_MACRO(${holder}.C | ||
| BUILDLIB TestHelpers_C | ||
| FIXTURES_REQUIRED root-io-newstl-TestHelpers-fixture | ||
| FIXTURES_SETUP root-io-newstl-${holder}-fixture) | ||
| ROOTTEST_COMPILE_MACRO(${test}.C | ||
| BUILDLIB ${holder}_C | ||
| FIXTURES_REQUIRED root-io-newstl-${holder}-fixture | ||
| FIXTURES_SETUP root-io-newstl-test-fixture) | ||
| endforeach() | ||
|
|
||
| if(APPLE OR MSVC) | ||
| set(_srun_ref stlIoTestMac.ref) | ||
| else() | ||
| set(_srun_ref stlIoTest.ref) | ||
| endif() | ||
|
|
||
| ROOTTEST_ADD_TEST(run | ||
| MACRO srun.C | ||
| MACROARG "\"${CMAKE_CURRENT_SOURCE_DIR}/\"" | ||
| OUTREF ${_srun_ref} | ||
| FIXTURES_REQUIRED root-io-newstl-test-fixture | ||
| FIXTURES_SETUP root-io-newstl-run-fixture) | ||
|
|
||
| # failing tests, crashes ROOT, was disabled in Makefile | ||
| ROOTTEST_ADD_TEST(nolib | ||
| MACRO readNoLib.C | ||
| MACROARG "\"vector.root\"" | ||
| OUTREF stlNoLibTest.ref | ||
| WILLFAIL | ||
| FIXTURES_REQUIRED root-io-newstl-run-fixture) | ||
|
|
||
| ROOTTEST_COMPILE_MACRO(ComplexTest.h | ||
| FIXTURES_SETUP root-io-newstl-ComplexTest_h-fixture) | ||
|
|
||
| ROOTTEST_COMPILE_MACRO(sample_bx_classes.C | ||
| FIXTURES_SETUP root-io-newstl-sample_bx_classes-fixture) | ||
|
|
||
| if(ClingWorkAroundMissingDynamicScope) | ||
| set(_complextest_load -e "(void)gROOT->ProcessLine(\".L ComplexTest.h+\")") | ||
| set(_sample_bx_classes_load -e "(void)gROOT->ProcessLine(\".L sample_bx_classes.C+\")") | ||
| endif() | ||
|
|
||
| ROOTTEST_ADD_TEST(ComplexTest | ||
| MACRO runComplexTest.C | ||
| ROOTEXE_OPTS ${_complextest_load} | ||
| OUTREF ComplexTest${ref_suffix} | ||
| FIXTURES_REQUIRED root-io-newstl-ComplexTest_h-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(SampleFile | ||
| MACRO sample_writer.C | ||
| ROOTEXE_OPTS ${_sample_bx_classes_load} | ||
| FIXTURES_REQUIRED root-io-newstl-sample_bx_classes-fixture | ||
| FIXTURES_SETUP root-io-newstl-SampleFile-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(emptyCollection | ||
| MACRO runemptyCollection.C | ||
| OUTREF emptyCollection.ref | ||
| FIXTURES_REQUIRED root-io-newstl-sample_bx_classes-fixture | ||
| root-io-newstl-SampleFile-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(emulatedWrite | ||
| COMMAND ${ROOT_hadd_CMD} -f result.root cmsJets_0.root cmsJets_1.root | ||
| COPY_TO_BUILDDIR cmsJets_0.root cmsJets_1.root | ||
| OUTREF emulatedWrite.ref) | ||
|
|
||
| ROOTTEST_ADD_TEST(base | ||
| MACRO runbase.C+ | ||
| OUTREF base.ref) | ||
|
|
||
| ROOTTEST_ADD_TEST(writetest_emulvector | ||
| MACRO writetest_emulvector.C | ||
| OUTREF emulvector.root.ref | ||
| FIXTURES_SETUP root-io-newstl-writetest_emulvector-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(readtest_emulvector | ||
| MACRO runEmulvector.C | ||
| OUTREF Emulvector.ref | ||
| FIXTURES_REQUIRED root-io-newstl-writetest_emulvector-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(writeMemberWise | ||
| MACRO writeMemberWise.cxx+ | ||
| FIXTURES_SETUP root-io-newstl-writeMemberWise-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(readMemberWise | ||
| MACRO execMemberWise.cxx+ | ||
| OUTREF execMemberWise.ref | ||
| FIXTURES_REQUIRED root-io-newstl-writeMemberWise-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(buildPospelov | ||
| MACRO buildPospelov.C | ||
| COPY_TO_BUILDDIR pospelov.2010.mc10_7TeV.pool.root PospelovPrintFile.C | ||
| FIXTURES_SETUP root-io-newstl-buildPospelov-fixture) | ||
|
|
||
| ROOTTEST_ADD_TEST(printPospelov | ||
| MACRO execPospelovPrintFile.C | ||
| OUTREF execPospelovPrintFile.ref | ||
| FIXTURES_REQUIRED root-io-newstl-buildPospelov-fixture) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,32 @@ | ||
| #ifndef Test_hh | ||
| #define Test_hh | ||
|
|
||
| #include "TObject.h" | ||
| #include <complex> | ||
| #include <vector> | ||
|
|
||
| #ifndef Test_hh | ||
| #define Test_hh | ||
| // #include <vector> | ||
|
|
||
| class Test: public TObject | ||
| { | ||
| public: | ||
|
|
||
| std::complex<double> fMyComplexVector; | ||
| //std::vector<std::complex<double> > fMyComplexVector; | ||
|
|
||
| void Set(int seed) { | ||
| fMyComplexVector = std::complex<double>(seed,seed*2); | ||
| } | ||
|
|
||
| bool TestValue(int seed) { | ||
| return ( seed == (int)fMyComplexVector.real() && seed == (int)(fMyComplexVector.imag()/2) ); | ||
| } | ||
| ClassDef(Test, 1); | ||
|
|
||
| ClassDefOverride(Test, 1); | ||
| }; | ||
|
|
||
| #ifdef __ROOTCLING__ | ||
| #pragma link C++ class std::complex<double>+; | ||
| #pragma link C++ class Test+; | ||
| #endif | ||
|
|
||
| #endif /* Test_hh */ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
|
|
||
| Processing runComplexTest.C... | ||
| Warning in <TStreamerInfo::Build>: _Complex_base<double,_C_double_complex>: base class _C_double_complex has no streamer or dictionary it will not be saved | ||
| Warning in <TStreamerInfo::Build>: complex<double>: base class _Complex_base<double,_C_double_complex> has no streamer or dictionary it will not be saved | ||
| The complex object was set properly: | ||
| 3 6 | ||
| The complex object was read properly: | ||
| 3 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
|
|
||
| Processing runComplexTest.C... | ||
| Warning in <TStreamerInfo::Build>: _Complex_base<double,_C_double_complex>: base class _C_double_complex has no streamer or dictionary it will not be saved | ||
| Warning in <TStreamerInfo::Build>: complex<double>: base class _Complex_base<double,_C_double_complex> has no streamer or dictionary it will not be saved | ||
pcanal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| The complex object was set properly: | ||
| 3 6 | ||
| The complex object was read properly: | ||
| 3 6 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.