Skip to content

Commit dd6e18d

Browse files
committed
issue #121
1 parent 64f5976 commit dd6e18d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

js/experiment/vt/src/test/qrcode-test-impl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ export const misc = function(qrcode) {
278278
let check = 0;
279279
const context = {
280280
fillStyle : '',
281-
fillRect : function() {
281+
fillRect : function(x, y, _width, _height) {
282282
count += 1;
283283
if (this.fillStyle == 'black') {
284-
check = (check + count) % 256;
284+
check += x + y * 21;
285285
}
286286
},
287287
};
@@ -291,7 +291,7 @@ export const misc = function(qrcode) {
291291
qr.make();
292292
qr.renderTo2dContext(context);
293293
expect(count).to.equal(21 * 21);
294-
expect(check).to.equal(181);
294+
expect(check).to.equal(93106);
295295
});
296296

297297
it('- (for coverage)', function(){

js/test/qrcode-test-impl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ export const misc = function(qrcode) {
278278
let check = 0;
279279
const context = {
280280
fillStyle : '',
281-
fillRect : function() {
281+
fillRect : function(x, y, _width, _height) {
282282
count += 1;
283283
if (this.fillStyle == 'black') {
284-
check = (check + count) % 256;
284+
check += x + y * 21;
285285
}
286286
},
287287
};
@@ -291,7 +291,7 @@ export const misc = function(qrcode) {
291291
qr.make();
292292
qr.renderTo2dContext(context);
293293
expect(count).to.equal(21 * 21);
294-
expect(check).to.equal(181);
294+
expect(check).to.equal(93106);
295295
});
296296

297297
it('- (for coverage)', function(){

0 commit comments

Comments
 (0)