testing - 等价划分,这是书中的错误示例吗?

标签 testing equivalence-classes

我试图理解这个主题并从最基本的主题(不是离散域)开始,我认为这是不正确的。

我还不能发布图片所以描述是这样的:

Income is greater than 0 and lesser than 500 = tax 0  
Income is greater than 500 and lesser than 1300 = tax 30  
Income is greater than 1300 and lesser than 5000 = tax 40

他们为负数定义了invalid class,对0-500和500到1300有效,对1300到5000无效。
我认为这是一个错误,无效类以 5000 为界并趋于无穷大。 我说得对吗?

最佳答案

正如您所提到的,我很确定其中存在错误。 有 3 个有效输入类和两个无效输入类,它们超出范围,即低于 0 或高于 5 000。

关于testing - 等价划分,这是书中的错误示例吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16129577/

相关文章:

unit-testing - 如何为测试目的重新定义/模拟 Go 中的方法?

testing - 单元测试。在创建界面之前还是之后?

testing - 如何在 gnu-make 的配方中两次重置 SHELL 变量?

testing - Go 测试覆盖率中的 covered 和 not tracked 是什么意思?

python - 在 Python 中使用等价类进行排序

powershell - 用于启用/禁用 TCP 端口的 Windows 10 脚本

python - 为给定的键函数生成所有可能的等价排序

boost - 在 C++ 中实现等价关系(使用 boost::disjoint_sets)

python - 给定 python 中的关系,是否有一种标准方法可以将可迭代对象划分为等价类?