mirror of
https://github.com/luxfi/zap.git
synced 2026-07-26 22:53:31 +00:00
test: use neutral fixtures in zap roundtrip tests
This commit is contained in:
@@ -45,7 +45,7 @@ func TestRoundTrip_ScalarsAndBytes(t *testing.T) {
|
||||
BlockContentHash [32]byte
|
||||
}{
|
||||
Version: 0x01,
|
||||
ChainID: 1000001, // arbitrary large chain ID fixture
|
||||
ChainID: 7654321, // arbitrary large chain ID fixture
|
||||
BlockHeight: 0xDEADBEEFCAFEF00D, // load-bearing pattern
|
||||
CertMinTier: 0x02, // LP-217 PQ-strict
|
||||
RequestID: 0x99887766,
|
||||
|
||||
@@ -105,13 +105,13 @@ test("encode→decode round-trip", () => {
|
||||
const b = new Builder(256);
|
||||
const ob = b.startObject(96);
|
||||
ob.setText(0, "satoshi.nakamoto@example.com");
|
||||
ob.setText(32, "liquidity");
|
||||
ob.setUint32(64, 1000001);
|
||||
ob.setText(32, "example");
|
||||
ob.setUint32(64, 1234567);
|
||||
ob.finishAsRoot();
|
||||
const r = Message.parse(unhex(hex(b.finish()))).root();
|
||||
assert.equal(r.text(0), "satoshi.nakamoto@example.com");
|
||||
assert.equal(r.text(32), "liquidity");
|
||||
assert.equal(r.uint32(64), 1000001);
|
||||
assert.equal(r.text(32), "example");
|
||||
assert.equal(r.uint32(64), 1234567);
|
||||
});
|
||||
|
||||
test("opcode parity with Go ProcedureOpcode", () => {
|
||||
|
||||
Reference in New Issue
Block a user