Created
October 12, 2017 14:40
-
-
Save simontraill/590693448e90022e10186b8981a20759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var execSync = require('child_process').execSync; | |
var assert = require('assert'); | |
var result = 'GOOD'; | |
var results = { | |
'input1.dat': '[450,460,470,480,490,500,510,520,530,540,6225]', | |
'input2.dat': '[910,839,1120,1014,1126,900,974,866,1698,1384,10944]', | |
'input3.dat': '[0,108,0,0,0,0,0,0,0,0,0]' | |
}; | |
try { | |
for (var input of Object.keys(results)) { | |
assert.equal(results[input],execSync("node buckets.js < " + input).toString().trim()); | |
} | |
} catch (e) { | |
result = 'BAD'; | |
} | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment