Skip to content

check_function: way to test if arguments are NOT specified #271

@filipsch

Description

@filipsch

With check_function() and check_args(), it is possible whether some arguments are specified, and whether they are correct (with has_equal_ast()), but it is not possible to check if some arguments are not specified. There is test_not() functionality, but this will not work in the current implementation: if certain arguments are not found in the solution, an exception is thrown and the SCT execution errors out.

To improve this, we could adopt a TestFailSolution exception, that is thrown every time we're trying to access e.g. an argument that is also not in the solution. This error is actually thrown if we're not in test_not() mode (the SCT was incorrectly written), and that is swallowed if we are in test_not() mode (the SCT did this on purpose).

cc @yashasroy

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions