on 05c1914 help sign in
15 lines 480 B history raw
1var nounT = require('./noun.js'),
2 bits = require('../bits.js'),
3 test = require('tape'),
4 tchk = require('tape-check'),
5 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}));