docs: anonymise project asset names in source comments
Measured figures are kept; only the studio-specific level and asset names are generalised, and the Perforce rationale is reworded to describe the class of setups rather than this one project. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -28,70 +28,70 @@ void IndirectReferenceScannerSpec::Define()
|
||||
It("finds the GameMode from DefaultEngine.ini and strips the _C class suffix", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(
|
||||
TEXT("GlobalDefaultGameMode=/Game/Space/Core/GameModes/BP_FirstPersonGameMode.BP_FirstPersonGameMode_C"));
|
||||
TEXT("GlobalDefaultGameMode=/Game/Core/GameModes/BP_GameMode.BP_GameMode_C"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Space/Core/GameModes/BP_FirstPersonGameMode")));
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Core/GameModes/BP_GameMode")));
|
||||
}
|
||||
});
|
||||
|
||||
It("finds the GameInstance from MenuSystemPro", [this]()
|
||||
It("finds the GameInstance from a purchased UI pack", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(
|
||||
TEXT("GameInstanceClass=/Game/MenuSystemPro/Blueprints/GameFramework/BP_MenuSystemGameInstance.BP_MenuSystemGameInstance_C"));
|
||||
TEXT("GameInstanceClass=/Game/a purchased UI pack/Blueprints/GameFramework/BP_MenuGameInstance.BP_MenuGameInstance_C"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0],
|
||||
FString(TEXT("/Game/MenuSystemPro/Blueprints/GameFramework/BP_MenuSystemGameInstance")));
|
||||
FString(TEXT("/Game/a purchased UI pack/Blueprints/GameFramework/BP_MenuGameInstance")));
|
||||
}
|
||||
});
|
||||
|
||||
It("finds a map reference with an object suffix", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(TEXT("EditorStartupMap=/Game/Space/Maps/Gyms/Gyms_Geoda.Gyms_Geoda"));
|
||||
const TArray<FString> Found = Extract(TEXT("EditorStartupMap=/Game/Maps/Gyms/Gyms_Geoda.Gyms_Geoda"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Space/Maps/Gyms/Gyms_Geoda")));
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Maps/Gyms/Gyms_Geoda")));
|
||||
}
|
||||
});
|
||||
|
||||
It("finds a bare package path with no object suffix", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(TEXT("GameDefaultMap=/Game/Space/Maps/RefinedMenuMap"));
|
||||
const TArray<FString> Found = Extract(TEXT("GameDefaultMap=/Game/Maps/RefinedMenuMap"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Space/Maps/RefinedMenuMap")));
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Maps/RefinedMenuMap")));
|
||||
}
|
||||
});
|
||||
|
||||
It("strips surrounding quotes and parentheses from an ini struct value", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(TEXT("+DirectoriesToAlwaysCook=(Path=\"/Game/Space/Art\")"));
|
||||
const TArray<FString> Found = Extract(TEXT("+DirectoriesToAlwaysCook=(Path=\"/Game/Art\")"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Space/Art")));
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Art")));
|
||||
}
|
||||
});
|
||||
|
||||
It("handles a C++ literal wrapped in TEXT()", [this]()
|
||||
{
|
||||
const TArray<FString> Found = Extract(
|
||||
TEXT("static const FSoftObjectPath Path(TEXT(\"/Game/Space/Art/SM_Rock\"));"));
|
||||
TEXT("static const FSoftObjectPath Path(TEXT(\"/Game/Art/SM_Rock\"));"));
|
||||
|
||||
TestEqual(TEXT("one hit"), Found.Num(), 1);
|
||||
if (Found.Num() == 1)
|
||||
{
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Space/Art/SM_Rock")));
|
||||
TestEqual(TEXT("package"), Found[0], FString(TEXT("/Game/Art/SM_Rock")));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user