| 4142 | // blankCppInlineAnnotationMacros regresses at least one of them. |
| 4143 | const N = 120; // 120 UPROPERTY + 120 UFUNCTION = ~240 in-body macros |
| 4144 | function denseReflectedHeader(): string { |
| 4145 | let members = ''; |
| 4146 | for (let i = 0; i < N; i++) { |
| 4147 | // line-leading UPROPERTY with nested meta=(...) (blankCppAnnotationMacroCalls) |
| 4148 | members += `\tUPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Move", meta=(ClampMin="0.0", EditCondition="bOn${i}", AllowedClasses="/Script/Engine.Texture"))\n\tTSubclassOf<AActor> Prop${i};\n`; |
| 4149 | // line-leading UFUNCTION + member-level ENGINE_API + UPARAM(ref) param |
| 4150 | // (all three passes) on an inline definition (has a body → is a node) |
| 4151 | members += `\tUFUNCTION(BlueprintCallable, Category="Move", meta=(DisplayName="Compute ${i}"))\n\tENGINE_API float Compute${i}(UPARAM(ref) float& In) const { return In * ${i}.0f; }\n`; |
| 4152 | } |
| 4153 | return `UCLASS(MinimalAPI, Blueprintable) |
| 4154 | class ENGINE_API UDenseMovement : public UPawnMovementComponent, public IRVOAvoidanceInterface, public INetworkPredictionInterface |
| 4155 | { |
| 4156 | \tGENERATED_BODY() |
| 4157 | public: |
| 4158 | \tDECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnMoved, float, Speed, FVector, Loc); |
| 4159 | \tusing FLegacyTick UE_DEPRECATED(5.5, "use TDelegate<void(float)>") = TMulticastDelegate<void(float)>; |
| 4160 | ${members}}; |
| 4161 | |
| 4162 | UENUM(BlueprintType) |
| 4163 | enum class EDenseMode : uint8 |
| 4164 | { |
| 4165 | \tWalking UMETA(DisplayName="Walk (fast), safe"), |
| 4166 | \tFlying UMETA(DisplayName="Fly"), |
| 4167 | \tCustom UMETA(Hidden), |
| 4168 | }; |
| 4169 | `; |
| 4170 | } |
| 4171 | |
| 4172 | it('recovers a ~240-macro reflected class, its base clause, and every decorated member', () => { |
| 4173 | const result = extractFromSource('DenseMovement.h', denseReflectedHeader()); |