{ "exercise": "sublist", "version": "1.1.0", "comments": [ "Lists are ordered and sequential.", "https://en.wikipedia.org/wiki/List_%28abstract_data_type%29", "", "Depending on your language, there may need to be some translation", "to go from the JSON array to the list representation.", "The expectation can be used to generate an expected value", "based on your implementation (such as a constant 'EQUAL', 'SUBLIST', etc.).", "", "If appropriate for your track, you'll need to ensure that no pair of expected values are equal.", "Otherwise, an implementation that always returns a constant value may falsely pass the tests.", "See https://github.com/exercism/xpython/issues/342" ], "cases": [ { "description": "empty lists", "property": "sublist", "input": { "listOne": [], "listTwo": [] }, "expected": "equal" }, { "description": "empty list within non empty list", "property": "sublist", "input": { "listOne": [], "listTwo": [1, 2, 3] }, "expected": "sublist" }, { "description": "non empty list contains empty list", "property": "sublist", "input": { "listOne": [1, 2, 3], "listTwo": [] }, "expected": "superlist" }, { "description": "list equals itself", "property": "sublist", "input": { "listOne": [1, 2, 3], "listTwo": [1, 2, 3] }, "expected": "equal" }, { "description": "different lists", "property": "sublist", "input": { "listOne": [1, 2, 3], "listTwo": [2, 3, 4] }, "expected": "unequal" }, { "description": "false start", "property": "sublist", "input": { "listOne": [1, 2, 5], "listTwo": [0, 1, 2, 3, 1, 2, 5, 6] }, "expected": "sublist" }, { "description": "consecutive", "property": "sublist", "input": { "listOne": [1, 1, 2], "listTwo": [0, 1, 1, 1, 2, 1, 2] }, "expected": "sublist" }, { "description": "sublist at start", "property": "sublist", "input": { "listOne": [0, 1, 2], "listTwo": [0, 1, 2, 3, 4, 5] }, "expected": "sublist" }, { "description": "sublist in middle", "property": "sublist", "input": { "listOne": [2, 3, 4], "listTwo": [0, 1, 2, 3, 4, 5] }, "expected": "sublist" }, { "description": "sublist at end", "property": "sublist", "input": { "listOne": [3, 4, 5], "listTwo": [0, 1, 2, 3, 4, 5] }, "expected": "sublist" }, { "description": "at start of superlist", "property": "sublist", "input": { "listOne": [0, 1, 2, 3, 4, 5], "listTwo": [0, 1, 2] }, "expected": "superlist" }, { "description": "in middle of superlist", "property": "sublist", "input": { "listOne": [0, 1, 2, 3, 4, 5], "listTwo": [2, 3] }, "expected": "superlist" }, { "description": "at end of superlist", "property": "sublist", "input": { "listOne": [0, 1, 2, 3, 4, 5], "listTwo": [3, 4, 5] }, "expected": "superlist" }, { "description": "first list missing element from second list", "property": "sublist", "input": { "listOne": [1, 3], "listTwo": [1, 2, 3] }, "expected": "unequal" }, { "description": "second list missing element from first list", "property": "sublist", "input": { "listOne": [1, 2, 3], "listTwo": [1, 3] }, "expected": "unequal" }, { "description": "order matters to a list", "property": "sublist", "input": { "listOne": [1, 2, 3], "listTwo": [3, 2, 1] }, "expected": "unequal" }, { "description": "same digits but different numbers", "property": "sublist", "input": { "listOne": [1, 0, 1], "listTwo": [10, 1] }, "expected": "unequal" } ] }