Skip to content

Commit 0315277

Browse files
committed
chore: remove redundant prefix from types in test
1 parent 83fdec4 commit 0315277

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

bindings/nim/nim_code/tests/test_yaml.nim

+17-17
Original file line numberDiff line numberDiff line change
@@ -67,73 +67,73 @@ template checkRes(res, body: untyped) =
6767

6868
template checkBytes48(res: untyped) =
6969
checkRes(res):
70-
let bytes = KzgBytes48.fromHex(n["output"])
70+
let bytes = Bytes48.fromHex(n["output"])
7171
check bytes == res.get
7272

7373
template checkBool(res: untyped) =
7474
checkRes(res):
7575
check n["output"].content == $res.get
7676

7777
suite "yaml tests":
78-
var ctx: KzgCtx
78+
var ctx: KZGCtx
7979
# We cannot run this in `setup` because that runs before _every_ test
8080
# and we only want to run this once
8181
#
8282
# This should also remove order dependency between tests; ie if we ran setup in a test
83-
ctx = newKzgCtx()
83+
ctx = newKZGCtx()
8484

8585
runTests(BLOB_TO_KZG_COMMITMENT_TESTS):
8686
let
87-
blob = KzgBlob.fromHex(n["input"]["blob"])
87+
blob = Blob.fromHex(n["input"]["blob"])
8888
res = ctx.blobToKZGCommitment(blob)
8989
checkBytes48(res)
9090

9191

9292
runTests(COMPUTE_CELLS_TESTS):
9393
let
94-
blob = KzgBlob.fromHex(n["input"]["blob"])
94+
blob = Blob.fromHex(n["input"]["blob"])
9595
res = ctx.computeCells(blob)
9696

9797
checkRes(res):
98-
let cells = KzgCell.fromHexList(n["output"])
98+
let cells = Cell.fromHexList(n["output"])
9999
check cells == res.get
100100

101101
runTests(COMPUTE_CELLS_AND_KZG_PROOFS_TESTS):
102102
let
103-
blob = KzgBlob.fromHex(n["input"]["blob"])
103+
blob = Blob.fromHex(n["input"]["blob"])
104104
res = ctx.computeCellsAndProofs(blob)
105105

106106
checkRes(res):
107-
let cells = KzgCell.fromHexList(n["output"][0])
107+
let cells = Cell.fromHexList(n["output"][0])
108108
check cells == res.get.cells
109-
let proofs = KzgProof.fromHexList(n["output"][1])
109+
let proofs = KZGProof.fromHexList(n["output"][1])
110110
check proofs == res.get.proofs
111111

112112
runTests(VERIFY_CELL_KZG_PROOF_TESTS):
113113
let
114-
commitment = KzgCommitment.fromHex(n["input"]["commitment"])
114+
commitment = KZGCommitment.fromHex(n["input"]["commitment"])
115115
cellId = n["input"]["cell_id"].content.parseInt().uint64
116-
cell = KzgCell.fromHex(n["input"]["cell"])
117-
proof = KzgProof.fromHex(n["input"]["proof"])
116+
cell = Cell.fromHex(n["input"]["cell"])
117+
proof = KZGProof.fromHex(n["input"]["proof"])
118118
res = ctx.verifyCellKZGProof(commitment, cellId, cell, proof)
119119
checkBool(res)
120120

121121
runTests(VERIFY_CELL_KZG_PROOF_BATCH_TESTS):
122122
let
123-
rowCommitments = KzgCommitment.fromHexList(n["input"]["row_commitments"])
123+
rowCommitments = KZGCommitment.fromHexList(n["input"]["row_commitments"])
124124
rowIndices = uint64.fromIntList(n["input"]["row_indices"])
125125
columnIndices = uint64.fromIntList(n["input"]["column_indices"])
126-
cells = KzgCell.fromHexList(n["input"]["cells"])
127-
proofs = KzgProof.fromHexList(n["input"]["proofs"])
126+
cells = Cell.fromHexList(n["input"]["cells"])
127+
proofs = KZGProof.fromHexList(n["input"]["proofs"])
128128
res = ctx.verifyCellKZGProofBatch(rowCommitments, rowIndices, columnIndices, cells, proofs)
129129
checkBool(res)
130130

131131
runTests(RECOVER_ALL_CELLS_TESTS):
132132
let
133133
cellIds = uint64.fromIntList(n["input"]["cell_ids"])
134-
cells = KzgCell.fromHexList(n["input"]["cells"])
134+
cells = Cell.fromHexList(n["input"]["cells"])
135135
res = ctx.recoverCells(cellIds, cells)
136136

137137
checkRes(res):
138-
let recovered = KzgCell.fromHexList(n["output"])
138+
let recovered = Cell.fromHexList(n["output"])
139139
check recovered == res.get

0 commit comments

Comments
 (0)