单链表的测试用例
一般来说,对于链表问题有哪些好的测试用例?例如,查找并消除重复项并返回指向第一个节点的指针的函数的测试用例。一些核心情况可能是:该函数是用 c# 或 Java 编写的,而不是用 c、c++ 编写的。假设所有正整数作为列表的节点。
- Null
- 空列表
- 带循环的链表 包含
- 所有重复项的列表
- 包含 1 个节点或 2 个节点的列表(2 个重复项)
- 无重复
- 项 列表可能会遇到整数溢出,以防内存不足(取决于 32 位机器、64 位机器)
- 安全测试,语言自动化、记忆问题、表现和压力
还有什么?期待令人震惊的测试用例......那里有专家吗?
What are some good testcases for a Linked list problem in general? for example test cases for a function which finds and eliminates duplicates and returns the pointer to the first node. Some core cases could be: the function is in c# or Java and not c, c++. Assume all positive integers as nodes of the list.
- Null
- Empty List
- Linked list with a loop
- List with all dups
- List with one node or 2 nodes (2 dups)
- No duplicates
- The list could encounter integer over flow, incase low memory (depending on 32 bit machine, 64 bit machine)
- Security testing, language automation, memory issues, performance and stress
What else? expecting outrageous test cases..any experts out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些怎么样?
How about these?
角色等
测试
roles etc
testing