From ccb7364c83a5b8321901606f9a8546d8d0684106 Mon Sep 17 00:00:00 2001 From: Natanael Sirqueira Date: Thu, 2 Mar 2023 08:21:30 -0400 Subject: [PATCH] Add case for when the rational number has not been reduced --- exercises/rational-numbers/canonical-data.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/exercises/rational-numbers/canonical-data.json b/exercises/rational-numbers/canonical-data.json index 389b1880ee..058d8aa1d3 100644 --- a/exercises/rational-numbers/canonical-data.json +++ b/exercises/rational-numbers/canonical-data.json @@ -403,7 +403,7 @@ }, { "uuid": "da137f1c-fc94-4035-9813-94f5152a1102", - "description": "Raise a negative real number to a rational number", + "description": "Raise a negative real number to a rational number that has been reduced", "property": "expreal", "input": { "x": -1, @@ -411,6 +411,16 @@ }, "expected": -1.0 }, + { + "uuid": "da137f1c-fc94-4035-9813-94f5152a1102", + "description": "Raise a negative real number to a rational number that has not been reduced", + "property": "expreal", + "input": { + "x": -1, + "r": [2, 2] + }, + "expected": -1.0 + }, { "uuid": "f3734f78-91b2-4e59-905e-8c61dbf34f39", "description": "Fails with a negative real number if the denominator of the reduced rational number is even",