exercism / exercism/problem-specifications

Rational-Numbers: >, <, ==, !=, >=, <= comparison tests?

未关闭
#1,481 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
new test case idea
主要语言
Ruby
星标
358
派生
563
平均合并
18 小时 41 分钟
30 天内合并 PR
2

描述

Would there be any interest in seeing test cases for comparing rational numbers?
```JSON
{
"description": "A half is less than three fourths",
"property": "lessThan",
"input": {
"r1": [1, 2],
"r2": [3, 4]
},
"expected": true
},
{
"description": "Half is greater than a fourth",
"property": "greaterThan",
"input": {
"r1": [1, 2],
"r2": [1, 4]
},
"expected": true
},
{
"description": "One is greater than or equal to a third",
"property": "greaterThanOrEqual",
"input": {
"r1": [13, 13],
"r2": [1, 3]
},
"expected": true
},
{
"description": "Two of the same are equal",
"property": "equal",
"input": {
"r1": [6, 1],
"r2": [6, 1]
},
"expected": true
},
{
"description": "Two different values are not equal",
"property": "notEqual",
"input": {
"r1": [3, 4],
"r2": [1, 2]
},
"expected": true
}
```
so and so forth.

I looked briefly to see if this topic had already be discussed and didn't find anything.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。