Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void GivenAFlagKeyThatIsNotASlug_ReturnsFlagNotFound_AndEvaluatesToDefaul
public void EvaluatesToDefaultValue_IfFeatureIsNotContainedWithinSet()
{
var featureToggles = new FeatureToggles([
new FeatureToggleEvaluation("testfeature", true, "evaluation-key", [], 100)
new FeatureToggleEvaluation("testfeature", false, "evaluation-key", [], 100)

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test’s setup change flips the toggle’s enabled value from true to false, but the test evaluates a different flag key ("anotherfeature"), so the enabled value is unused. Since this PR is focused on adding Unicode hashing cases, consider reverting this unrelated change (or add a brief note explaining why it’s needed) to keep the diff minimal and avoid confusion about the test’s intent.

Suggested change
new FeatureToggleEvaluation("testfeature", false, "evaluation-key", [], 100)
new FeatureToggleEvaluation("testfeature", true, "evaluation-key", [], 100)

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah. This is fine.

], []);
Comment on lines 69 to 73

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hunk changes the existing "EvaluatesToDefaultValue_IfFeatureIsNotContainedWithinSet" setup from an enabled to a disabled toggle. Since it’s unrelated to the stated goal of adding Unicode hashing test cases, consider reverting this change or updating the PR description to mention the test cleanup (to keep the PR focused).

Copilot uses AI. Check for mistakes.

var context = new OctopusFeatureContext(featureToggles, NullLoggerFactory.Instance);
Expand Down Expand Up @@ -409,6 +409,16 @@ public void WhenNoTargetingKey_RolloutIsEqualToOneHundredPercent_ResolvesToTrue(
[InlineData("bucket", "j", 1)]
[InlineData("test", "y", 100)]
[InlineData("flag", "c", 100)]
[InlineData("test-feature", "用户", 30)]
[InlineData("test-feature", "مستخدم", 19)]
[InlineData("test-feature", "ユーザー", 73)]
[InlineData("test-feature", "🎉", 54)]
[InlineData("test-feature", "café", 31)]
[InlineData("test-feature", "naïve", 28)]
[InlineData("rollout", "用户-001", 20)]
[InlineData("experiment-a", "пользователь", 81)]
[InlineData("test-feature", "사용자", 62)]
[InlineData("dark-launch", "テナント-001", 8)]
public void GetNormalizedNumber_MatchesExpectedValue(string evaluationKey, string targetingKey, int expected)
{
OctopusFeatureContext.GetNormalizedNumber(evaluationKey, targetingKey).Should().Be(expected);
Expand Down
Loading