Skip to content

prime-factors: add further variations #1755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 90 additions & 6 deletions exercises/prime-factors/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@
"input": {
"value": 2
},
"expected": [2]
"expected": [
2
]
},
{
"uuid": "238d57c8-4c12-42ef-af34-ae4929f94789",
"description": "another prime number",
"property": "factors",
"input": {
"value": 3
},
"expected": [
3
]
},
{
"uuid": "f59b8350-a180-495a-8fb1-1712fbee1158",
Expand All @@ -29,7 +42,22 @@
"input": {
"value": 9
},
"expected": [3, 3]
"expected": [
3,
3
]
},
{
"uuid": "756949d3-3158-4e3d-91f2-c4f9f043ee70",
"description": "product of first prime",
"property": "factors",
"input": {
"value": 4
},
"expected": [
2,
2
]
},
{
"uuid": "bc8c113f-9580-4516-8669-c5fc29512ceb",
Expand All @@ -38,7 +66,50 @@
"input": {
"value": 8
},
"expected": [2, 2, 2]
"expected": [
2,
2,
2
]
},
{
"uuid": "7d6a3300-a4cb-4065-bd33-0ced1de6cb44",
"description": "product of second prime",
"property": "factors",
"input": {
"value": 27
},
"expected": [
3,
3,
3
]
},
{
"uuid": "073ac0b2-c915-4362-929d-fc45f7b9a9e4",
"description": "product of third prime",
"property": "factors",
"input": {
"value": 625
},
"expected": [
5,
5,
5,
5
]
},
{
"uuid": "6e0e4912-7fb6-47f3-a9ad-dbcd79340c75",
"description": "product of first and second prime",
"property": "factors",
"input": {
"value": 6
},
"expected": [
2,
3
]
},
{
"uuid": "00485cd3-a3fe-4fbe-a64a-a4308fc1f870",
Expand All @@ -47,7 +118,11 @@
"input": {
"value": 12
},
"expected": [2, 2, 3]
"expected": [
2,
2,
3
]
},
{
"uuid": "02251d54-3ca1-4a9b-85e1-b38f4b0ccb91",
Expand All @@ -56,7 +131,12 @@
"input": {
"value": 901255
},
"expected": [5, 17, 23, 461]
"expected": [
5,
17,
23,
461
]
},
{
"uuid": "070cf8dc-e202-4285-aa37-8d775c9cd473",
Expand All @@ -65,7 +145,11 @@
"input": {
"value": 93819012551
},
"expected": [11, 9539, 894119]
"expected": [
11,
9539,
894119
]
}
]
}
Expand Down