taxicabNumbers
is a function.
testString: assert(typeof taxicabNumbers === 'function', 'taxicabNumbers
is a function.');
- text: taxicabNumbers
should return an array.
testString: assert(typeof taxicabNumbers(2) === 'object', 'taxicabNumbers
should return an array.');
- text: taxicabNumbers
should return an array of numbers.
testString: assert(typeof taxicabNumbers(100)[0] === 'number', 'taxicabNumbers
should return an array of numbers.');
- text: taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].
testString: assert.deepEqual(taxicabNumbers(4), res4, 'taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].');
- text: taxicabNumbers(25) should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]
testString: assert.deepEqual(taxicabNumbers(25), res25, 'taxicabNumbers(25) should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]');
- text: taxicabNumbers(39) resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].
testString: assert.deepEqual(taxicabNumbers(39).slice(20, 29), res39From20To29, 'taxicabNumbers(39) resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].');
```