Helper: build a Component with a single ResourceType in type index 0.
| 1071 | |
| 1072 | // Helper: build a Component with a single ResourceType in type index 0. |
| 1073 | inline AST::Component::Component makeCompWithLocalResource() { |
| 1074 | AST::Component::Component Comp; |
| 1075 | Comp.getSections().emplace_back(); |
| 1076 | Comp.getSections().back().emplace<AST::Component::TypeSection>(); |
| 1077 | auto &TypeSec = |
| 1078 | std::get<AST::Component::TypeSection>(Comp.getSections().back()); |
| 1079 | TypeSec.getContent().emplace_back(); |
| 1080 | TypeSec.getContent().back().setResourceType(AST::Component::ResourceType{}); |
| 1081 | return Comp; |
| 1082 | } |
| 1083 | |
| 1084 | // Helper: append a CanonSection with a single canonical to the component. |
| 1085 | inline AST::Component::CanonSection & |
no test coverage detected