nac3standalone: add tests for list slice and len #178

Merged
sb10q merged 1 commits from add_list_len_test into master 2022-01-26 06:56:12 +08:00
Collaborator

Add tests for list slice and len

Actually I think it might be better to fuzz test these things using cpython rand, but since we only support dropping part of the list while the generated random numbers are also very likely to be extending the list, so I still manually wrote these tests, which should be able to cover a big portion of use cases..

Add tests for list slice and `len` Actually I think it might be better to fuzz test these things using cpython `rand`, but since we only support dropping part of the list while the generated random numbers are also very likely to be extending the list, so I still manually wrote these tests, which should be able to cover a big portion of use cases..
ychenfo added 1 commit 2022-01-26 04:05:46 +08:00
Owner

You could generate test cases using a RNG and save the result, but unit tests need to be deterministic. Debugging failures would be very annoying otherwise.

You could generate test cases using a RNG and save the result, but unit tests need to be deterministic. Debugging failures would be very annoying otherwise.
sb10q merged commit 43048eb8d8 into master 2022-01-26 06:56:12 +08:00
sb10q deleted branch add_list_len_test 2022-01-26 06:56:12 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#178
No description provided.