test sequence用例
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
test sequence用例
1. Test case: Empty sequence
- Input: an empty sequence
- Expected output: an empty sequence
- Steps:
1. Create an empty sequence.
2. Call the test sequence function with the empty sequence as input.
3. Verify that the output sequence is also empty.
2. Test case: Sequence with non-numeric elements
- Input: a sequence containing non-numeric elements (e.g., strings) - Expected output: an empty sequence
- Steps:
1. Create a sequence with non-numeric elements (e.g., ["a", "b", "c"]).
2. Call the test sequence function with the sequence as input.
3. Verify that the output sequence is empty.
3. Test case: Sequence with positive numbers
- Input: a sequence containing positive numbers
- Expected output: a sequence with the same elements
- Steps:
1. Create a sequence with positive numbers (e.g., [1, 2, 3, 4, 5]).
2. Call the test sequence function with the sequence as input.
3. Verify that the output sequence is the same as the input sequence.
4. Test case: Sequence with negative numbers
- Input: a sequence containing negative numbers
- Expected output: a sequence with the same elements, but in reverse order
- Steps:
1. Create a sequence with negative numbers (e.g., [-5, -4, -3, -2, -
1]).
2. Call the test sequence function with the sequence as input.
3. Verify that the output sequence is the reverse of the input sequence.
5. Test case: Sequence with both positive and negative numbers - Input: a sequence containing positive and negative numbers
- Expected output: a sequence with the positive numbers first, followed by the negative numbers in reverse order
- Steps:
1. Create a sequence with both positive and negative numbers
(e.g., [1, -2, 3, -4, 5]).
2. Call the test sequence function with the sequence as input.
3. Verify that the output sequence contains the positive numbers first, followed by the negative numbers in reverse order.。