Skip to content

fix(tests): remove invalid-type cases from ValidateBlockHeight tests#2

Open
AdamuAbba wants to merge 1 commit into
btrust-builders:mainfrom
AdamuAbba:fix_test_validate_block_height
Open

fix(tests): remove invalid-type cases from ValidateBlockHeight tests#2
AdamuAbba wants to merge 1 commit into
btrust-builders:mainfrom
AdamuAbba:fix_test_validate_block_height

Conversation

@AdamuAbba
Copy link
Copy Markdown
Contributor

Description

  • commit - 70f3518
    • Remove 123.5 (double) and std::string assertions from ValidateBlockHeight test:
      • Since type rejection is a compiler concern, not runtime logic so invalid types should fail to compile, not return error strings.

        Screenshot 2026-05-21 at 3 27 18 PM
      • removing both validate_block_height(123.5) and validate_block_height(std::string{"100"}) assertions allows ValidateBlockHeight test to pass once a student provides a solution accounting for runtime logic tests (negative values, out-of-range, etc), without changing the validate_block_height function parameter type.

        Screenshot 2026-05-21 at 3 32 11 PM

Signed-off-by: shytypes <abbaadamu302@gmail.com>
@bartoli
Copy link
Copy Markdown

bartoli commented May 28, 2026

Not sure about removing the decimal test, but surely, adding an overload taking a string just to return that strings are not supported is strange

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