bsp: Fix tests

This commit is contained in:
Hajime Hoshi 2018-03-03 23:30:59 +09:00
parent d944d51c14
commit 08610fcd8b

View File

@ -72,103 +72,103 @@ func TestBSP(t *testing.T) {
},
{
In: []Op{
{100, 200, -1},
{200, 400, -1},
{MaxSize, MaxSize, -1},
{100, 200, -1},
{50, 50, -1},
{200, 200, -1},
{MaxSize, MaxSize, -1},
{500, 500, -1},
{600, 600, -1},
{200, 400, -1},
{100, 100, -1},
{400, 400, -1},
{MaxSize, MaxSize, -1},
{1000, 1000, -1},
{1200, 1200, -1},
{200, 200, -1},
{0, 0, 2},
{100, 200, -1},
{200, 400, -1},
},
Out: []*Rect{
{0, 0, 100, 200},
{0, 0, 200, 400},
nil,
{0, 200, 100, 200},
{0, 400, 50, 50},
{100, 0, 200, 200},
{0, 400, 200, 400},
{0, 800, 100, 100},
{200, 0, 400, 400},
nil,
{100, 200, 500, 500},
{200, 400, 1000, 1000},
nil,
{0, 450, 100, 100},
{0, 900, 200, 200},
nil,
{0, 200, 100, 200},
{0, 400, 200, 400},
},
},
{
In: []Op{
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{256, 256, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{512, 512, -1},
{256, 256, -1},
{512, 512, -1},
},
Out: []*Rect{
{0, 0, 256, 256},
{0, 256, 256, 256},
{0, 512, 256, 256},
{0, 768, 256, 256},
{0, 0, 512, 512},
{0, 512, 512, 512},
{0, 1024, 512, 512},
{0, 1536, 512, 512},
{256, 0, 256, 256},
{512, 0, 256, 256},
{768, 0, 256, 256},
{256, 256, 256, 256},
{512, 0, 512, 512},
{1024, 0, 512, 512},
{1536, 0, 512, 512},
{512, 512, 512, 512},
{256, 512, 256, 256},
{256, 768, 256, 256},
{512, 256, 256, 256},
{768, 256, 256, 256},
{512, 1024, 512, 512},
{512, 1536, 512, 512},
{1024, 512, 512, 512},
{1536, 512, 512, 512},
{512, 512, 256, 256},
{512, 768, 256, 256},
{768, 512, 256, 256},
{768, 768, 256, 256},
{1024, 1024, 512, 512},
{1024, 1536, 512, 512},
{1536, 1024, 512, 512},
{1536, 1536, 512, 512},
nil,
},
},
{
In: []Op{
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{300, 300, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
{600, 600, -1},
},
Out: []*Rect{
{0, 0, 300, 300},
{0, 300, 300, 300},
{0, 600, 300, 300},
{300, 0, 300, 300},
{600, 0, 300, 300},
{300, 300, 300, 300},
{300, 600, 300, 300},
{600, 300, 300, 300},
{600, 600, 300, 300},
{0, 0, 600, 600},
{0, 600, 600, 600},
{0, 1200, 600, 600},
{600, 0, 600, 600},
{1200, 0, 600, 600},
{600, 600, 600, 600},
{600, 1200, 600, 600},
{1200, 600, 600, 600},
{1200, 1200, 600, 600},
nil,
},
},