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

Fixed several issues related to number handling and wildcard processing #896

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

izmp
Copy link
Contributor

@izmp izmp commented Jan 28, 2025

Summary

Fixed several issues related to number handling and wildcard processing in the YAML files and ImpactWildcardProcessor. Verified and tested on build v8.6.0.

Note

This pull request message was generated with the help of Copilot translation due to language limitations. Thank you for your understanding.

Fixes

Related Issues

#873

Detailed Explanation

Probability using large numbers in n2

{1-9999999$$0|1|2|3}
  expected probability:
   25% = length 1 (0 or 1 or..):
   25% = length 2 (01 or 12 or...):
   25% = length 3 (012 or 123 or ...):
   25% = length 4 (0123 or 1230 or...):
  actual probability:
   0% = length 1 (0 or 1 or..):
   0% = length 2 (01 or 12 or...):
   0% = length 3 (012 or 123 or ...):
   99% = length 4 (0123 or 1230 or...):

n1-$$ is not supported

{1-$$0|1|2|3}
  expected probability:
   25% = length 1 (0 or 1 or..):
   25% = length 2 (01 or 12 or...):
   25% = length 3 (012 or 123 or ...):
   25% = length 4 (0123 or 1230 or...):
  actual probability:
   100% = length 1 (0 or 1 or..):
   0% = length 2 (01 or 12 or...):
   0% = length 3 (012 or 123 or ...):
   0% = length 4 (0123 or 1230 or...):

Issue #873 - Using separator, wildcards, and multi-selection in ImpactWildcardProcessor

{1-3$$sep$$<wildcard>}
  expected probability:
   33% = length 1 (0 or 1 or..):
   33% = length 2 (01 or 12 or...):
   33% = length 3 (012 or 123 or ...):
  actual probability:
   100% = length 1 (0 or 1 or..):
   0% = length 2 (01 or 12 or...):
   0% = length 3 (012 or 123 or ...):

YAML number value causes error

# .yaml
  numberonly:
    # Value should be a string, numbers result in incorrect strings
    type_int:
      - 0
      - 1
    # Value should be a string, numbers result in incorrect strings
    type_int2: 0
    type_int3: 1
    # "0", "1" is correct value
    type_str:
      - |-
        0
      - |-
        1
    type_str2: "1"

Testing

  • Verified probability calculations are now accurate with various number ranges.

  • Confirmed that n1-$$ is now supported as expected.

  • Tested ImpactWildcardProcessor with multiple scenarios involving separators, wildcards, and multi-selection to ensure correct results.

  • Checked YAML files to confirm number values are correctly processed as strings.

@ltdrdata ltdrdata merged commit ccb6285 into ltdrdata:Main Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants