Skip to content
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

feat(tier): Add isValidTierType #4358

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

hjpalpha
Copy link
Collaborator

suggestion for a resolve of #4357

Summary

Add isValidTierType fucntion to tier module

How did you test this change?

sandbox on sc2 + test cases

@hjpalpha hjpalpha requested a review from Rathoz June 19, 2024 09:14
Copy link
Collaborator Author

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

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

in case we want it to be false for empty input

Comment on lines +67 to +68
if String.isEmpty(tierType) then return true end

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
if String.isEmpty(tierType) then return true end

Comment on lines +45 to +46
assert.is_true(Tier.isValidTierType(''))
assert.is_true(Tier.isValidTierType())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
assert.is_true(Tier.isValidTierType(''))
assert.is_true(Tier.isValidTierType())
assert.is_false(Tier.isValidTierType(''))
assert.is_false(Tier.isValidTierType())

@hjpalpha hjpalpha linked an issue Jun 19, 2024 that may be closed by this pull request
@Rathoz
Copy link
Collaborator

Rathoz commented Jun 19, 2024

in case we want it to be false for empty input

That's a really good question.. Since empty tiertype is both a valid tiertype, but also an indication of no special tiertype. 🤔

@Rathoz Rathoz marked this pull request as draft July 9, 2024 09:36
@hjpalpha
Copy link
Collaborator Author

hjpalpha commented Aug 1, 2024

modules discussion:

  • hjp & fenrir indifferent
  • martin leaning slightly to false for empty ones
  • salt leaning slightly to true for empty ones

any further opinion? @Rathoz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to validate a tiertype without supplying tier
2 participants