-
Notifications
You must be signed in to change notification settings - Fork 0
test: Add unicode test cases #9
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 | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -61,7 +61,7 @@ void givenAFlagKeyThatIsNotASlug_ThrowsFlagNotFound() { | |||||||||||||||||||||||||||||||||||||||||
| @Test | ||||||||||||||||||||||||||||||||||||||||||
| void throwsFlagNotFound_IfFeatureIsNotContainedWithinSet() { | ||||||||||||||||||||||||||||||||||||||||||
| var toggles = new FeatureToggles( | ||||||||||||||||||||||||||||||||||||||||||
| List.of(new FeatureToggleEvaluation("testfeature", true, "evaluation-key", Collections.emptyList(), 100)), | ||||||||||||||||||||||||||||||||||||||||||
| List.of(new FeatureToggleEvaluation("testfeature", false, "evaluation-key", Collections.emptyList(), 100)), | ||||||||||||||||||||||||||||||||||||||||||
| new byte[0] | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| var subject = new OctopusContext(toggles); | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -396,7 +396,17 @@ static Stream<Arguments> cases() { | |||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test", "az", 1), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("bucket", "j", 1), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test", "y", 100), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("flag", "c", 100) | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("flag", "c", 100), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "用户", 30), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "مستخدم", 19), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "ユーザー", 73), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "🎉", 54), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "café", 31), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "naïve", 28), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("rollout", "用户-001", 20), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("experiment-a", "пользователь", 81), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "사용자", 62), | ||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("dark-launch", "テナント-001", 8) | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+400
to
+409
|
||||||||||||||||||||||||||||||||||||||||||
| Arguments.of("test-feature", "用户", 30), | |
| Arguments.of("test-feature", "مستخدم", 19), | |
| Arguments.of("test-feature", "ユーザー", 73), | |
| Arguments.of("test-feature", "🎉", 54), | |
| Arguments.of("test-feature", "café", 31), | |
| Arguments.of("test-feature", "naïve", 28), | |
| Arguments.of("rollout", "用户-001", 20), | |
| Arguments.of("experiment-a", "пользователь", 81), | |
| Arguments.of("test-feature", "사용자", 62), | |
| Arguments.of("dark-launch", "テナント-001", 8) | |
| Arguments.of("test-feature", "\u7528\u6237", 30), | |
| Arguments.of("test-feature", "\u0645\u0633\u062A\u062E\u062F\u0645", 19), | |
| Arguments.of("test-feature", "\u30E6\u30FC\u30B6\u30FC", 73), | |
| Arguments.of("test-feature", "\uD83C\uDF89", 54), | |
| Arguments.of("test-feature", "caf\u00E9", 31), | |
| Arguments.of("test-feature", "na\u00EFve", 28), | |
| Arguments.of("rollout", "\u7528\u6237-001", 20), | |
| Arguments.of("experiment-a", "\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C", 81), | |
| Arguments.of("test-feature", "\uC0AC\uC6A9\uC790", 62), | |
| Arguments.of("dark-launch", "\u30C6\u30CA\u30F3\u30C8-001", 8) |
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.
As these are just tests, I think we can proceed and address only if it causes problems.
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 change (setting the existing toggle from enabled to disabled) looks unrelated to the PR’s stated goal of adding Unicode hashing test cases. Since the toggle’s enabled state is not used in this assertion (the evaluated slug is different and should throw FlagNotFound regardless), consider reverting this line to keep the PR focused and avoid noisy diffs.
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.
Fine here too 😄