Skip to content

Commit

Permalink
fix: removed another q
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Feb 13, 2021
1 parent 17d7df6 commit 8e20245
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/SwingSet/src/kernel/vatManager/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export function makeVatManagerFactory({
!bundle || typeof bundle === 'object',
`bundle must be object, not a plain string`,
);
assert(!setup || enableSetup, X`setup() provided, but not enabled`); // todo maybe useless
// todo maybe useless
assert(!(setup && !enableSetup), X`setup() provided, but not enabled`);
}

// returns promise for new vatManager
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/netstring.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert, details as X, q } from '@agoric/assert';
import { assert, details as X } from '@agoric/assert';

// adapted from 'netstring-stream', https://github.com/tlivings/netstring-stream/
const { Transform } = require('stream');
Expand Down Expand Up @@ -51,7 +51,7 @@ export function decode(data) {
const size = parseInt(sizeString, 10);
if (!(size > -1)) {
// reject NaN, all negative numbers
assert.fail(X`unparseable size ${q(sizeString)}, should be integer`);
assert.fail(X`unparseable size ${sizeString}, should be integer`);
}
if (data.length < colon + 1 + size + 1) {
break; // still waiting for `${DATA}.`
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/test/test-netstring.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test('decode', t => {
}

// bad('a', 'non-numeric length prefix');
bad('a:', `unparseable size "a", should be integer`);
bad('a:', /unparseable size .*, should be integer/);
bad('1:ab', 'malformed netstring: not terminated by comma');
});

Expand Down

0 comments on commit 8e20245

Please sign in to comment.