|
| 1 | +int numErrors = 0; |
| 2 | + |
| 3 | +void check(const char *what) { |
| 4 | + if (!TClassTable::GetProto(what)) { |
| 5 | + std::cerr << "FAILED to get TProtoClass for \"" << what << "\"\n"; |
| 6 | + ++numErrors; |
| 7 | + } |
| 8 | +} |
| 9 | + |
| 10 | +void check_not(const char *what) { |
| 11 | + if (TClassTable::GetProto(what)) { |
| 12 | + std::cerr << "FAILED to NOT get TProtoClass for \"" << what |
| 13 | + << "\" (expected nullptr but got != nullptr)\n"; |
| 14 | + ++numErrors; |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +int execROOT10804() { |
| 19 | + if (gSystem->Load("libROOT10804_dictrflx") < 0) { |
| 20 | + std::cerr << "Failed to load ROOT10804Dict!\n"; |
| 21 | + return 1; |
| 22 | + } |
| 23 | + check("Outer::Inline::Class"); |
| 24 | + check("Outer::Class"); |
| 25 | + |
| 26 | + check("list<Outer::Inline::Class>"); |
| 27 | + check("list<Outer::Class>"); |
| 28 | + check("std::list<Outer::Inline::Class>"); |
| 29 | + check("std::list<Outer::Class>"); |
| 30 | + |
| 31 | + check("Outer::Container<Outer::Inline::Class>"); |
| 32 | + check("Outer::Container<Outer::Inline::Class>"); |
| 33 | + check("Outer::Container<Outer::Class>"); |
| 34 | + |
| 35 | + check("Outer::Inline::Template<Outer::Inline::Class>"); |
| 36 | + check("Outer::Template<Outer::Inline::Class>"); |
| 37 | + check("Outer::Inline::Template<Outer::Class>"); |
| 38 | + check("Outer::Template<Outer::Class>"); |
| 39 | + |
| 40 | + check("Outer::Container<" |
| 41 | + "Outer::Inline::Template<" |
| 42 | + "Outer::Inline::Class>>"); |
| 43 | + |
| 44 | + check("Outer::Container<" |
| 45 | + "Outer::Inline::Template<" |
| 46 | + "Outer::Inline::Class>>>"); |
| 47 | + |
| 48 | + check("Outer::Container<" |
| 49 | + "Outer::Inline::Template<" |
| 50 | + "Outer::Class>>"); |
| 51 | + check("Outer::Container<" |
| 52 | + "Outer::Template<" |
| 53 | + "Outer::Inline::Class>>"); |
| 54 | + |
| 55 | + check("Outer::Container<" |
| 56 | + "Outer::Template<" |
| 57 | + "Outer::Class>>"); |
| 58 | + |
| 59 | + // Container is not Inline:: |
| 60 | + check_not("Outer::Inline::Container<" |
| 61 | + "Outer::Inline::Template<" |
| 62 | + "Outer::Inline::Class>>"); |
| 63 | + |
| 64 | + // Float16_t won't get a demangled alternate name, |
| 65 | + // only as-written-in-selection.xml |
| 66 | + check("Outer::Template<Float16_t>"); |
| 67 | + // FIXME: can be resolved now that the payload has been parsed. |
| 68 | + // And that shows that the test needs to check *one* type name only, |
| 69 | + // before parsing the payload. |
| 70 | + //!!! check_not("Outer::Inline::Template<Float16_t>"); |
| 71 | + |
| 72 | + // Double32_t won't get a demangled alternate name, |
| 73 | + // only as-written-in-selection.xml |
| 74 | + check("Outer::Container<Outer::Template<Double32_t>>"); |
| 75 | + // FIXME: can be resolved now that the payload has been parsed. |
| 76 | + // And that shows that the test needs to check *one* type name only, |
| 77 | + // before parsing the payload. |
| 78 | + //!!! check_not("Outer::Container<Outer::Inline::Template<Double32_t>>"); |
| 79 | + |
| 80 | + // Cross-check: not selected. |
| 81 | + check_not("Outer::Container<int>"); |
| 82 | + check_not("Outer::Container<Outer::Template<Float16_t>>"); |
| 83 | + check_not("Outer::Template<float>"); // but did select Template<Float16_t>! |
| 84 | + return numErrors ? 1 : 0; |
| 85 | +} |
0 commit comments