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

Allow running in strict mode #64

Open
S-S-X opened this issue Nov 30, 2021 · 1 comment
Open

Allow running in strict mode #64

S-S-X opened this issue Nov 30, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request in-latest-docker Included with latest docker images, might not yet be available elsewhere

Comments

@S-S-X
Copy link
Owner

S-S-X commented Nov 30, 2021

Allow setting strict mode in configuration file.

When strict mode is enabled it should throw errors to fail tests immediately if:

  • Deprecated engine functions are used.
    • Example: ItemStack:get_metadata() (method is deprecated)
    • Most functions already do this because there's no implementation for most deprecated functions.
  • Engine API function call would return error.
    • Example: InvRef:set_size("main", -1) (function returns false to indicate error)
  • Values or types that can be converted are supplied
    • Example: InvRef:set_size("main", "1") (string instead of number)
    • Example: InvRef:set_size("main", 1.2) (floating point truncated)

Possibly could also allow types for strict mode, something like:
strict = types,deprecated to throw error for type conversions and deprecated calls.
strict = all to throw error on anything not considered accurate or completely valid.

Also link to #5

@S-S-X S-S-X added the enhancement New feature or request label Nov 30, 2021
@S-S-X S-S-X changed the title Strict mode (throw errors to fail tests if deprecated engine functions are used) Allow running in strict mode Nov 30, 2021
@S-S-X
Copy link
Owner Author

S-S-X commented Apr 3, 2022

From closed duplicate #61

Option: lazy failure to allow continuing test case and make calls to deprecated functions fail test case after completion.
This allows prioritizing other assertions and completion of whole test cases even with deprecated function calls but would still fail at the end.

@S-S-X S-S-X added this to Mineunit Jan 11, 2024
@S-S-X S-S-X moved this to Ready in Mineunit Jan 11, 2024
@S-S-X S-S-X self-assigned this Jan 11, 2024
@S-S-X S-S-X moved this from Ready to In progress in Mineunit Jan 11, 2024
@S-S-X S-S-X added the in-latest-docker Included with latest docker images, might not yet be available elsewhere label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in-latest-docker Included with latest docker images, might not yet be available elsewhere
Projects
Status: In progress
Development

No branches or pull requests

1 participant