-
Notifications
You must be signed in to change notification settings - Fork 1
test: Add unicode test cases #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
| ], []); | ||
|
Comment on lines
69
to
73
|
||
|
|
||
| var context = new OctopusFeatureContext(featureToggles, NullLoggerFactory.Instance); | ||
|
|
@@ -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); | ||
|
|
||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah. This is fine.