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

Confusing hamming tests #61

Open
BNAndras opened this issue Sep 17, 2024 · 2 comments
Open

Confusing hamming tests #61

BNAndras opened this issue Sep 17, 2024 · 2 comments
Assignees
Labels

Comments

@BNAndras
Copy link
Sponsor Member

    REM ------- Batch does not support empty string as a parameter. -------
    REM set "expected=left strand must not be empty"
    REM set "if_success=Test passed"
    REM set "if_failed=Test failed: disallow left empty strand."
    REM CALL :Assert "" "G"

    set "expected=right strand must not be empty"
    set "if_success=Test passed"
    set "if_failed=Test failed: disallow right empty strand."
    CALL :Assert "G" ""

If Batch doesn't support an empty string parameter, why is only the first test commented out and not the second one? Should these even be included if the tests can't be run in Batch?

@GroophyLifefor
Copy link
Member

In the first test, empty parameter not taken so first parameter will be like Assert G and second one too can't take empty parameter so second parameter will gone and just first parameter will stay so will be Assert G, when you look we have two same test at the end, second parameter does not have so it's empty in second.

:Assert "" "G" -> :Assert "G"

:Assert "G" "" -> :Assert "G"

:Assert "G" "A" -> :Assert "G" "A"

@BNAndras
Copy link
Sponsor Member Author

BNAndras commented Sep 19, 2024

I don't understand why we need to keep the first test in the test suite if it's not even being run (since it's commented-out).
If we remove the left empty strand test since it can't be properly implemented, we should also remove the right empty strand test. It doesn't make sense to only validate if the right strand is empty when :Assert "G" "" already runs afoul of the rule that the strands need to be the same length. We already have tests in the suite for that.

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

No branches or pull requests

2 participants