Skip to content

Commit 339f5c9

Browse files
committed
test: fix bar tests
* Fixed the bar tests that make use of the attribute offset. The values of the bar center in these tests were incorrect.
1 parent db7105d commit 339f5c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/jasmine/tests/bar_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ describe('Bar.setPositions', function() {
330330
var cd = gd.calcdata;
331331
assertPointField(cd, 'b', [[0, 0, 0], [0, 0, 0], [0, 0, 0]]);
332332
assertPointField(cd, 's', [[1, 2, 3], [10, 20, 30], [-1, -2, -3]]);
333-
assertPointField(cd, 'x', [[-0.25, 0.75, 1.75], [0.25, 1.25, 2.25], [0, 1, 2]]);
333+
assertPointField(cd, 'x', [[-0.25, 0.75, 1.75], [0.25, 1.25, 2.25], [-0.5, 0.5, 1.5]]);
334334
assertPointField(cd, 'y', [[1, 2, 3], [10, 20, 30], [-1, -2, -3]]);
335335
});
336336

@@ -407,7 +407,7 @@ describe('Bar.setPositions', function() {
407407
var cd = gd.calcdata;
408408
assertPointField(cd, 'b', [[0, 0, 0]]);
409409
assertPointField(cd, 's', [[100, 100, 100]]);
410-
assertPointField(cd, 'x', [[0, 1, 2]]);
410+
assertPointField(cd, 'x', [[0.5, 1.5, 2.5]]);
411411
assertPointField(cd, 'y', [[100, 100, 100]]);
412412
});
413413

@@ -426,7 +426,7 @@ describe('Bar.setPositions', function() {
426426
var cd = gd.calcdata;
427427
assertPointField(cd, 'b', [[0, 0, 0]]);
428428
assertPointField(cd, 's', [[100, 100, 100]]);
429-
assertPointField(cd, 'x', [[0, 1, 2]]);
429+
assertPointField(cd, 'x', [[0.5, 1.5, 2.5]]);
430430
assertPointField(cd, 'y', [[100, 100, 100]]);
431431
});
432432

0 commit comments

Comments
 (0)