Skip to content

Conversation

monadius
Copy link
Collaborator

Fixes #3.

Nested tests with labels are supported as test groups (DESCRIBE).

Example kumite: https://www.codewars.com/kumite/620a7361d746e5000f36a021/

Test output:

<IT::>Top level test case

<FAILED::>not equal

<COMPLETEDIN::>0.17

<DESCRIBE::>Test Odd

<IT::>Should return false for 1

<PASSED::>Test passed

<COMPLETEDIN::>0.73

<IT::>Should return false for 7

<PASSED::>Test passed

<COMPLETEDIN::>0.57

<COMPLETEDIN::>1.43

<DESCRIBE::>Test even

<IT::>Should return true for 100

<PASSED::>Test passed

<COMPLETEDIN::>1.43

<IT::>Should return true for 42

<PASSED::>Test passed

<COMPLETEDIN::>1.42

<COMPLETEDIN::>3.50

<DESCRIBE::>Test edge cases

<DESCRIBE::>Test zero

<IT::>Should return true for 0

<PASSED::>Test passed

<COMPLETEDIN::>0.65

<COMPLETEDIN::>0.72

<DESCRIBE::>Test -1

<IT::>Should return false for -1

<PASSED::>Test passed

<COMPLETEDIN::>1.21

<COMPLETEDIN::>1.29

<COMPLETEDIN::>2.04

<DESCRIBE::>Unlabeled tests

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>not equal

<COMPLETEDIN::>1.98

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>not equal

<COMPLETEDIN::>1.99

<DESCRIBE::>

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>not equal

<COMPLETEDIN::>1.31

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>not equal

<COMPLETEDIN::>1.13

<COMPLETEDIN::>2.68

<COMPLETEDIN::>6.76

<DESCRIBE::>Nested labels

<DESCRIBE::>Outer label

<DESCRIBE::>Inner label

<DESCRIBE::>Tests with nested labels

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>expected: false but got: true

<COMPLETEDIN::>2.06

<IT::>

<FAILED::>Incorrect answer for n=100<:LF:>expected: false but got: true

<COMPLETEDIN::>1.29

<COMPLETEDIN::>3.55

<COMPLETEDIN::>3.56

<COMPLETEDIN::>3.56

<COMPLETEDIN::>3.57

@kazk kazk merged commit 8054aad into codewars:main Feb 16, 2022
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.

Improvement: add support for nested labels
2 participants