tests: add failing scripts by cross-verifying ASM/Hex
This commit is contained in:
parent
d00ec9af29
commit
d904e4424c
1 changed files with 10 additions and 2 deletions
|
@ -28,8 +28,13 @@ describe('Script', function () {
|
||||||
|
|
||||||
describe('fromASM/toASM', function () {
|
describe('fromASM/toASM', function () {
|
||||||
fixtures.valid.forEach(function (f) {
|
fixtures.valid.forEach(function (f) {
|
||||||
|
if (!f.asm) return
|
||||||
|
|
||||||
it('decodes/encodes ' + f.description, function () {
|
it('decodes/encodes ' + f.description, function () {
|
||||||
assert.equal(Script.fromASM(f.asm).toASM(), f.asm)
|
var script = Script.fromASM(f.asm)
|
||||||
|
|
||||||
|
assert.equal(script.toASM(), f.asm)
|
||||||
|
assert.equal(script.toHex(), f.hex)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -37,7 +42,10 @@ describe('Script', function () {
|
||||||
describe('fromHex/toHex', function () {
|
describe('fromHex/toHex', function () {
|
||||||
fixtures.valid.forEach(function (f) {
|
fixtures.valid.forEach(function (f) {
|
||||||
it('decodes/encodes ' + f.description, function () {
|
it('decodes/encodes ' + f.description, function () {
|
||||||
assert.equal(Script.fromHex(f.hex).toHex(), f.hex)
|
var script = Script.fromHex(f.hex)
|
||||||
|
|
||||||
|
assert.equal(script.toASM(), f.asm)
|
||||||
|
assert.equal(script.toHex(), f.hex)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue