This issue involves implementing the xor (exclusive OR) function in MeTTa and creating test cases to ensure its correctness. The xor function should evaluate the given arguments and return True only if exactly one of the arguments is True. Additionally, test cases should be integrated into the tests/baseline_compat/hyperon-mettalog_sanity directory to verify different scenarios, including side effects to ensure both expressions are executed.
A new file named xor_test.metta should be added to the tests/baseline_compat/hyperon-mettalog_sanity directory.
Include the Following Test Cases but make up a couple if you wish:
The xor function should be implemented and tested comprehensively, covering simple, expression-based, and side-effect scenarios. The tests should be integrated into the existing test suite, confirming that the function behaves consistently across different cases and that both bodies are evaluated, even when side effects are involved.
This issue involves implementing the
xor
(exclusive OR) function in MeTTa and creating test cases to ensure its correctness. Thexor
function should evaluate the given arguments and returnTrue
only if exactly one of the arguments isTrue
. Additionally, test cases should be integrated into thetests/baseline_compat/hyperon-mettalog_sanity
directory to verify different scenarios, including side effects to ensure both expressions are executed.xor_test.metta
should be added to thetests/baseline_compat/hyperon-mettalog_sanity
directory.Include the Following Test Cases but make up a couple if you wish:
The
xor
function should be implemented and tested comprehensively, covering simple, expression-based, and side-effect scenarios. The tests should be integrated into the existing test suite, confirming that the function behaves consistently across different cases and that both bodies are evaluated, even when side effects are involved.