Skip to content

Commit f4a0520

Browse files
test(audience-sdk): parametrise DistributionPlatform casing across all platforms
Init's lowercase-normalisation tests covered "Steam" / "STEAM" / "steam" but not the other four public DistributionPlatforms values (Epic, GOG, Itch, Standalone). Adding a sixth platform would land without coverage. Add a parametrised Init_LowercasesDistributionPlatform_AcrossAllPublicValues test that takes each public DistributionPlatforms constant, uppercases it, runs Init, and asserts the canonical lowercase form is restored. Follow-up to SDK-272 (centralisation of duplicated literals).
1 parent ba8c062 commit f4a0520

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/Packages/Audience/Tests/Runtime/ImmutableAudienceTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,21 @@ public void Init_LeavesDistributionPlatformUnchanged_WhenAlreadyLowercase()
11511151
Assert.AreEqual(DistributionPlatforms.Steam, config.DistributionPlatform);
11521152
}
11531153

1154+
// Lowercase normalisation must apply to every DistributionPlatforms value.
1155+
[TestCase(DistributionPlatforms.Steam)]
1156+
[TestCase(DistributionPlatforms.Epic)]
1157+
[TestCase(DistributionPlatforms.GOG)]
1158+
[TestCase(DistributionPlatforms.Itch)]
1159+
[TestCase(DistributionPlatforms.Standalone)]
1160+
public void Init_LowercasesDistributionPlatform_AcrossAllPublicValues(string canonical)
1161+
{
1162+
var config = MakeConfig();
1163+
config.DistributionPlatform = canonical.ToUpperInvariant();
1164+
ImmutableAudience.Init(config);
1165+
1166+
Assert.AreEqual(canonical, config.DistributionPlatform);
1167+
}
1168+
11541169
[Test]
11551170
public void Init_LeavesDistributionPlatformNull_WhenNotSet()
11561171
{

0 commit comments

Comments
 (0)