Skip to content

Commit ccc06eb

Browse files
committed
もうすこしテストを追加してみる
1 parent ae60fd5 commit ccc06eb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/test_goban.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ QUnit.test("隅のアタリ判定", function() {
3535

3636
QUnit.module("point", {});
3737

38-
QUnit.test("pointのテスト", function() {
38+
QUnit.test("真ん中にあるやつ", function() {
3939
var board = new Goban.Board({ 'size': 9 });
4040
board.point(3, 3, Goban.BLACK);
4141
QUnit.equal(board.point(3, 3), Goban.BLACK, "ちゃんとsetされていること");
42+
QUnit.equal(board.data[3*9+3], Goban.BLACK, "ちゃんとsetされていること");
43+
});
44+
45+
QUnit.test("上辺", function() {
46+
var board = new Goban.Board({ 'size': 9 });
47+
board.point(0, 3, Goban.BLACK);
48+
QUnit.equal(board.point(0, 3), Goban.BLACK, "ちゃんとsetされていること");
49+
QUnit.equal(board.data[3*9+0], Goban.BLACK, "ちゃんとsetされていること");
4250
});
4351

4452
QUnit.module("isDead", {});

0 commit comments

Comments
 (0)