-
Notifications
You must be signed in to change notification settings - Fork 72
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
base: main
Are you sure you want to change the base?
Conversation
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.
in case we want it to be false for empty input
if String.isEmpty(tierType) then return true end | ||
|
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.
if String.isEmpty(tierType) then return true end |
assert.is_true(Tier.isValidTierType('')) | ||
assert.is_true(Tier.isValidTierType()) |
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.
assert.is_true(Tier.isValidTierType('')) | |
assert.is_true(Tier.isValidTierType()) | |
assert.is_false(Tier.isValidTierType('')) | |
assert.is_false(Tier.isValidTierType()) |
That's a really good question.. Since empty tiertype is both a valid tiertype, but also an indication of no special tiertype. 🤔 |
modules discussion:
any further opinion? @Rathoz |
suggestion for a resolve of #4357
Summary
Add
isValidTierType
fucntion to tier moduleHow did you test this change?
sandbox on sc2 + test cases