diff --git a/remix-lib/test/util.js b/remix-lib/test/util.js index ef440ad457..7ca502e3f8 100644 --- a/remix-lib/test/util.js +++ b/remix-lib/test/util.js @@ -69,3 +69,11 @@ tape('util.escapeRegExp', function (t) { t.ok(new RegExp(util.escapeRegExp(original)).test(original), 'should still test for original string') }) +tape('util.compareByteCode', function (t) { + t.plan(1) + var address = 'c2a9cef5420203c2672f0e4325cca774893cca98' + var nullAddress = '0000000000000000000000000000000000000000' + var deployedLibraryByteCode = '0x73c2a9cef5420203c2672f0e4325cca774893cca983014608060405260043610610058576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063f26ea02c1461005d575b600080fd5b81801561006957600080fd5b506100886004803603810190808035906020019092919050505061008a565b005b600081600101600060648110151561009e57fe5b600502016002018190555060008160010160006064811015156100bd57fe5b600502016004018190555060008160010160006064811015156100dc57fe5b6005020160030181905550600081600001819055506001816101f501819055816101f601819055506064816101f70181905550505600a165627a7a723058203a6f106db7413fd9cad962bc12ba2327799d6b1334335f7bb854eab04200b3bf0029' + t.ok(util.compareByteCode(deployedLibraryByteCode, deployedLibraryByteCode.replace(address, nullAddress)), 'library bytecode should be the same') +}) +