Fixed tests for octal operations.

This commit is contained in:
n1474335 2017-04-05 22:00:06 +01:00
parent a36c9ca339
commit 5f85bff315
5 changed files with 88 additions and 7 deletions

View file

@ -56,7 +56,7 @@ const ByteRepr = {
/**
* To Oct operation.
* To Octal operation.
*
* @author Matt C [matt@artemisbot.pw]
* @param {byteArray} input
@ -65,11 +65,12 @@ const ByteRepr = {
*/
runToOct: function(input, args) {
var delim = Utils.charRep[args[0] || "Space"];
return input.map(val => parseInt(Utils.bin(val), 2).toString(8)).join(delim);
return input.map(val => val.toString(8)).join(delim);
},
/**
* From Oct operation.
* From Octal operation.
*
* @author Matt C [matt@artemisbot.pw]
* @param {string} input
@ -82,6 +83,7 @@ const ByteRepr = {
return input.split(delim).map(val => parseInt(val, 8));
},
/**
* @constant
* @default