From be6fa53f98fffb96a37ddd618ad133260d5aea28 Mon Sep 17 00:00:00 2001 From: Guntbert Reiter Date: Mon, 5 Dec 2016 21:44:30 +0100 Subject: [PATCH] leap: Rewrite the test cases and their descriptions - only test cases remain that are necessary - they have a clear description to help providing good names for tests --- exercises/leap/canonical-data.json | 31 ++++++++---------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/exercises/leap/canonical-data.json b/exercises/leap/canonical-data.json index 8d8f2ef6d3..9a0750dd7b 100644 --- a/exercises/leap/canonical-data.json +++ b/exercises/leap/canonical-data.json @@ -1,37 +1,22 @@ { "cases": [ { - "description": "leap year in twentieth century", - "input": 1996, - "expected": true - }, - { - "description": "odd standard year in twentieth century", - "input": 1997, - "expected": false - }, - { - "description": "even standard year in twentieth century", - "input": 1998, + "description": "year not divisible by 4: common year", + "input": 2015, "expected": false }, { - "description": "standard year in nineteenth century", - "input": 1900, - "expected": false + "description": "year divisible by 4, not divisible by 100: leap year", + "input": 2016, + "expected": true }, { - "description": "standard year in eighteenth century", - "input": 1800, + "description": "year divisible by 100, not divisible by 400: common year", + "input": 2100, "expected": false }, { - "description": "leap year twenty four hundred", - "input": 2400, - "expected": true - }, - { - "description": "leap year two thousand", + "description": "year divisible by 400: leap year", "input": 2000, "expected": true }