Skip to content

Commit

Permalink
Minor code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondavies committed Mar 21, 2013
1 parent f9c1bbb commit 34059e2
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion test/event/dispatch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ suite.addBatch({
d.bar();
assert.deepEqual(those, [b, b]);
assert.isUndefined(d.on(".a"));
},
}
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/geo/azimuthal-equidistant-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.addBatch({
"Tierra del Fuego": [[ -35.62300462, -60.29317484], [ 425.30773539, 414.57947189]],
"Tokyo": [[ 33.38709832, 79.49539834], [ 501.59066113, 38.40245747]],
"the South Pole": [[ 0.00000000, -85.00000000], [ 480.00000000, 472.52947963]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]]
}),
"translated to 0,0 and at scale 1": projectionTestSuite({
topic: function(projection) { return projection().translate([0, 0]).scale(1); }
Expand Down
2 changes: 1 addition & 1 deletion test/geo/conic-equidistant-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.addBatch({
"Tierra del Fuego": [[ -35.62300462, -60.29317484], [ 341.92988745, 387.20169005]],
"Tokyo": [[ 33.38709832, 79.49539834], [ 509.12411912, 37.80365327]],
"the South Pole": [[ 0.00000000, -85.00000000], [ 480.00000000, 472.52947963]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]]
}),
"translated to 0,0 and at scale 1": projectionTestSuite({
topic: function(projection) { return projection().translate([0, 0]).scale(1); }
Expand Down
2 changes: 1 addition & 1 deletion test/geo/equirectangular-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.addBatch({
"Tierra del Fuego": [[ -35.62300462, -60.29317484], [ 386.73919199, 407.84716262]],
"Tokyo": [[ 33.38709832, 79.49539834], [ 567.40721901, 41.88153382]],
"the South Pole": [[ 0.00000000, -85.00000000], [ 480.00000000, 472.52947963]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]]
}),
"translated to 0,0 and at scale 1": projectionTestSuite({
topic: function(projection) { return projection().translate([0, 0]).scale(1); }
Expand Down
2 changes: 1 addition & 1 deletion test/geo/mercator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.addBatch({
"Tierra del Fuego": [[ -35.62300462, -60.29317484], [ 386.73919199, 449.08559401]],
"Tokyo": [[ 33.38709832, 79.49539834], [ 567.40721901, -108.01311493]],
"west antimeridian": [[-180.00000000, 0.00000000], [ 8.76110196, 250.00000000]],
"east antimeridian": [[ 180.00000000, 0.00000000], [ 951.23889804, 250.00000000]],
"east antimeridian": [[ 180.00000000, 0.00000000], [ 951.23889804, 250.00000000]]
}),
"translated to 0,0 and at scale 1": projectionTestSuite({
topic: function(projection) { return projection().translate([0, 0]).scale(1); }
Expand Down
8 changes: 4 additions & 4 deletions test/geo/path-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ suite.addBatch({
geometry: {
type: "LineString",
coordinates: [[-63, 18], [-62, 18], [-62, 17]]
},
}
});
assert.deepEqual(testContext.buffer(), [
{type: "moveTo", x: 165, y: 160},
Expand All @@ -62,7 +62,7 @@ suite.addBatch({
geometry: {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
},
}
});
assert.deepEqual(testContext.buffer(), [
{type: "moveTo", x: 165, y: 160},
Expand Down Expand Up @@ -247,7 +247,7 @@ suite.addBatch({
geometry: {
type: "Polygon",
coordinates: [[[-63, 18], [-62, 18], [-62, 17], [-63, 18]]]
},
}
});
assert.deepEqual(testContext.buffer(), [
{type: "moveTo", x: -63, y: 18},
Expand Down Expand Up @@ -276,7 +276,7 @@ suite.addBatch({
geometry: {
type: "__proto__",
coordinates: [[[-63.03, 18.02], [-63.14, 18.06], [-63.01, 18.07], [-63.03, 18.02]]]
},
}
}), null);
}
},
Expand Down
2 changes: 1 addition & 1 deletion test/geo/projection-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.addBatch({
"a custom invertible projection": {
topic: function(projection) {
function forward(λ, φ) { return [λ, φ]; }
forward.invert = function(x, y) {}
forward.invert = function(x, y) {};
return projection(forward);
},

Expand Down
2 changes: 1 addition & 1 deletion test/geo/transverse-mercator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.addBatch({
"Tierra del Fuego": [[ -35.62300462, -60.29317484], [ 435.43771875, 420.48139861]],
"Tokyo": [[ 33.38709832, 79.49539834], [ 495.09974957, 37.42095689]],
"the South Pole": [[ 0.00000000, -85.00000000], [ 480.00000000, 472.52947963]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]],
"the North Pole": [[ 0.00000000, 85.00000000], [ 480.00000000, 27.47052037]]
}),
"translated to 0,0 and at scale 1": projectionTestSuite({
topic: function(projection) { return projection().translate([0, 0]).scale(1); }
Expand Down
2 changes: 1 addition & 1 deletion test/geom/quadtree-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite.addBatch({
},
"has the default y-accessor, d[1]": function(q) {
assert.strictEqual(q.y()([42, 43]), 43);
},
}
},
"the quadtree applied directly": {
"can create an empty quadtree": function(quadtree) {
Expand Down
2 changes: 1 addition & 1 deletion test/layout/treemap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ suite.addBatch({
},
"no overhanging rectangles": function(treemap) {
var t = treemap().size([100, 100]).sort(function(a, b) { return a.value - b.value; }),
data = [0, 0, 81681.85, 370881.9, 0, 0, 0, 255381.59, 0, 0, 0, 0, 0, 0, 0, 125323.95, 0, 0, 0, 186975.07, 185707.05, 267370.93, 0]
data = [0, 0, 81681.85, 370881.9, 0, 0, 0, 255381.59, 0, 0, 0, 0, 0, 0, 0, 125323.95, 0, 0, 0, 186975.07, 185707.05, 267370.93, 0],
nodes = t.nodes({children: data.map(function(d) { return {value: d}; })}).map(layout);
assert.equal(nodes.filter(function(n) { return n.dx < 0 || n.dy < 0 || n.x + n.dx > 100 || n.y + n.dy > 100; }).length, 0);
},
Expand Down
2 changes: 1 addition & 1 deletion test/scale/quantile-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ suite.addBatch({
assert.deepEqual(x.quantiles(), [7.5, 9, 14]);
},
"range cardinality determines the number of quantiles": function(quantile) {
var x = quantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]);;
var x = quantile().domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20]);
assert.deepEqual(x.range([0, 1, 2, 3]).quantiles(), [7.25, 9, 14.5]);
assert.deepEqual(x.range([0, 1]).quantiles(), [9]);
assert.deepEqual(x.range([,,,,,]).quantiles(), [6.8, 8, 11.2, 15.2]);
Expand Down
2 changes: 1 addition & 1 deletion test/svg/arc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ suite.addBatch({
var c = arc().innerRadius(100).outerRadius(200).startAngle(Math.PI).endAngle(2 * Math.PI).centroid();
assert.inDelta(c[0], -150, 1e-6);
assert.inDelta(c[1], 0, 1e-6);
},
}
}
});

Expand Down
8 changes: 4 additions & 4 deletions test/svg/axis-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ suite.addBatch({
line = tick.select("line"),
path = g.select("path.domain");
assert.equal(tick.attr("transform"), "translate(0.2,0)");
assert.equal(text.attr("y"), -9)
assert.equal(text.attr("y"), -9);
assert.equal(text.attr("dy"), "0em");
assert.equal(text.style("text-anchor"), "middle");
assert.equal(text.text(), "0.2");
Expand All @@ -76,7 +76,7 @@ suite.addBatch({
line = tick.select("line"),
path = g.select("path.domain");
assert.equal(tick.attr("transform"), "translate(0,0.2)");
assert.equal(text.attr("x"), 9)
assert.equal(text.attr("x"), 9);
assert.equal(text.attr("dy"), ".32em");
assert.equal(text.style("text-anchor"), "start");
assert.equal(text.text(), "0.2");
Expand All @@ -91,7 +91,7 @@ suite.addBatch({
line = tick.select("line"),
path = g.select("path.domain");
assert.equal(tick.attr("transform"), "translate(0.2,0)");
assert.equal(text.attr("y"), 9)
assert.equal(text.attr("y"), 9);
assert.equal(text.attr("dy"), ".71em");
assert.equal(text.style("text-anchor"), "middle");
assert.equal(text.text(), "0.2");
Expand All @@ -106,7 +106,7 @@ suite.addBatch({
line = tick.select("line"),
path = g.select("path.domain");
assert.equal(tick.attr("transform"), "translate(0,0.2)");
assert.equal(text.attr("x"), -9)
assert.equal(text.attr("x"), -9);
assert.equal(text.attr("dy"), ".32em");
assert.equal(text.style("text-anchor"), "end");
assert.equal(text.text(), "0.2");
Expand Down

0 comments on commit 34059e2

Please sign in to comment.