on 2305dbd help sign in
15 lines 468 B history raw
1import nounT from './noun.js';
2import bits from '../bits.js';
3import test from 'tape';
4import tchk from 'tape-check';
5var check = tchk.check;
7test('bytes', check({times: 10000}, nounT.genAtom, function (t, a) {
8 t.plan(1);
9 nounT.equals(t, bits.bytesToAtom(bits.atomToBytes(a)), a, 'round trip');
10}));
12test('words', check({times: 10000}, nounT.genAtom, function (t, a) {
13 t.plan(1);
14 nounT.equals(t, bits.wordsToAtom(bits.atomToWords(a)), a, 'round trip');
15}));