Skip to content

Commit f393a65

Browse files
trinary: remove unneeded nesting
1 parent bb2f852 commit f393a65

File tree

1 file changed

+97
-102
lines changed

1 file changed

+97
-102
lines changed

exercises/trinary/canonical-data.json

Lines changed: 97 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,108 +2,103 @@
22
"exercise": "trinary",
33
"cases": [
44
{
5-
"description": "returns the decimal representation of the input trinary value",
6-
"cases": [
7-
{
8-
"uuid": "a7a79a9e-5606-454c-9cdb-4f3c0ca46931",
9-
"description": "trinary 1 is decimal 1",
10-
"property": "toDecimal",
11-
"input": {
12-
"trinary": 1
13-
},
14-
"expected": 1
15-
},
16-
{
17-
"uuid": "39240078-13e2-4eb8-87c4-aeffa7d64130",
18-
"description": "trinary 2 is decimal 2",
19-
"property": "toDecimal",
20-
"input": {
21-
"trinary": 2
22-
},
23-
"expected": 2
24-
},
25-
{
26-
"uuid": "81900d67-7e07-4d41-a71e-86f1cd72ce1f",
27-
"description": "trinary 10 is decimal 3",
28-
"property": "toDecimal",
29-
"input": {
30-
"trinary": 10
31-
},
32-
"expected": 3
33-
},
34-
{
35-
"uuid": "7a8d5341-f88a-4c60-9048-4d5e017fa701",
36-
"description": "trinary 11 is decimal 4",
37-
"property": "toDecimal",
38-
"input": {
39-
"trinary": 11
40-
},
41-
"expected": 4
42-
},
43-
{
44-
"uuid": "6b3c37f6-d6b3-4575-85c0-19f48dd101af",
45-
"description": "trinary 100 is decimal 9",
46-
"property": "toDecimal",
47-
"input": {
48-
"trinary": 100
49-
},
50-
"expected": 9
51-
},
52-
{
53-
"uuid": "a210b2b8-d333-4e19-9e59-87cabdd2a0ba",
54-
"description": "trinary 112 is decimal 14",
55-
"property": "toDecimal",
56-
"input": {
57-
"trinary": 112
58-
},
59-
"expected": 14
60-
},
61-
{
62-
"uuid": "5ae03472-b942-42ce-ba00-e84a7dc86dd8",
63-
"description": "trinary 222 is decimal 26",
64-
"property": "toDecimal",
65-
"input": {
66-
"trinary": 222
67-
},
68-
"expected": 26
69-
},
70-
{
71-
"uuid": "d4fabf94-6149-4d1e-b42f-b34dc3ddef8f",
72-
"description": "trinary 1122000120 is decimal 32091",
73-
"property": "toDecimal",
74-
"input": {
75-
"trinary": 1122000120
76-
},
77-
"expected": 32091
78-
},
79-
{
80-
"uuid": "34be152d-38f3-4dcf-b5ab-9e14fe2f7161",
81-
"description": "invalid trinary digits returns 0",
82-
"property": "toDecimal",
83-
"input": {
84-
"trinary": "1234"
85-
},
86-
"expected": 0
87-
},
88-
{
89-
"uuid": "b57aa24d-3da2-4787-9429-5bc94d3112d6",
90-
"description": "invalid word as input returns 0",
91-
"property": "toDecimal",
92-
"input": {
93-
"trinary": "carrot"
94-
},
95-
"expected": 0
96-
},
97-
{
98-
"uuid": "673c2057-5d89-483c-87fa-139da6927b90",
99-
"description": "invalid numbers with letters as input returns 0",
100-
"property": "toDecimal",
101-
"input": {
102-
"trinary": "0a1b2c"
103-
},
104-
"expected": 0
105-
}
106-
]
5+
"uuid": "a7a79a9e-5606-454c-9cdb-4f3c0ca46931",
6+
"description": "trinary 1 is decimal 1",
7+
"property": "toDecimal",
8+
"input": {
9+
"trinary": 1
10+
},
11+
"expected": 1
12+
},
13+
{
14+
"uuid": "39240078-13e2-4eb8-87c4-aeffa7d64130",
15+
"description": "trinary 2 is decimal 2",
16+
"property": "toDecimal",
17+
"input": {
18+
"trinary": 2
19+
},
20+
"expected": 2
21+
},
22+
{
23+
"uuid": "81900d67-7e07-4d41-a71e-86f1cd72ce1f",
24+
"description": "trinary 10 is decimal 3",
25+
"property": "toDecimal",
26+
"input": {
27+
"trinary": 10
28+
},
29+
"expected": 3
30+
},
31+
{
32+
"uuid": "7a8d5341-f88a-4c60-9048-4d5e017fa701",
33+
"description": "trinary 11 is decimal 4",
34+
"property": "toDecimal",
35+
"input": {
36+
"trinary": 11
37+
},
38+
"expected": 4
39+
},
40+
{
41+
"uuid": "6b3c37f6-d6b3-4575-85c0-19f48dd101af",
42+
"description": "trinary 100 is decimal 9",
43+
"property": "toDecimal",
44+
"input": {
45+
"trinary": 100
46+
},
47+
"expected": 9
48+
},
49+
{
50+
"uuid": "a210b2b8-d333-4e19-9e59-87cabdd2a0ba",
51+
"description": "trinary 112 is decimal 14",
52+
"property": "toDecimal",
53+
"input": {
54+
"trinary": 112
55+
},
56+
"expected": 14
57+
},
58+
{
59+
"uuid": "5ae03472-b942-42ce-ba00-e84a7dc86dd8",
60+
"description": "trinary 222 is decimal 26",
61+
"property": "toDecimal",
62+
"input": {
63+
"trinary": 222
64+
},
65+
"expected": 26
66+
},
67+
{
68+
"uuid": "d4fabf94-6149-4d1e-b42f-b34dc3ddef8f",
69+
"description": "trinary 1122000120 is decimal 32091",
70+
"property": "toDecimal",
71+
"input": {
72+
"trinary": 1122000120
73+
},
74+
"expected": 32091
75+
},
76+
{
77+
"uuid": "34be152d-38f3-4dcf-b5ab-9e14fe2f7161",
78+
"description": "invalid trinary digits returns 0",
79+
"property": "toDecimal",
80+
"input": {
81+
"trinary": "1234"
82+
},
83+
"expected": 0
84+
},
85+
{
86+
"uuid": "b57aa24d-3da2-4787-9429-5bc94d3112d6",
87+
"description": "invalid word as input returns 0",
88+
"property": "toDecimal",
89+
"input": {
90+
"trinary": "carrot"
91+
},
92+
"expected": 0
93+
},
94+
{
95+
"uuid": "673c2057-5d89-483c-87fa-139da6927b90",
96+
"description": "invalid numbers with letters as input returns 0",
97+
"property": "toDecimal",
98+
"input": {
99+
"trinary": "0a1b2c"
100+
},
101+
"expected": 0
107102
}
108103
]
109104
}

0 commit comments

Comments
 (0)