2011-02-07 13:28:09 -05:00
|
|
|
module('Size');
|
2011-02-13 11:26:24 -05:00
|
|
|
test('new Size(10, 20)', function() {
|
2011-02-07 13:28:09 -05:00
|
|
|
var size = new Size(10, 20);
|
2011-05-21 15:11:53 -04:00
|
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
2011-02-07 13:28:09 -05:00
|
|
|
});
|
|
|
|
|
2011-02-13 11:26:24 -05:00
|
|
|
test('new Size([10, 20])', function() {
|
2011-02-07 13:28:09 -05:00
|
|
|
var size = new Size([10, 20]);
|
2011-05-21 15:11:53 -04:00
|
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
2011-02-07 13:28:09 -05:00
|
|
|
});
|
|
|
|
|
2011-02-13 11:26:24 -05:00
|
|
|
test('new Size({width: 10, height: 20})', function() {
|
2011-02-07 13:28:09 -05:00
|
|
|
var size = new Size({width: 10, height: 20});
|
2011-05-21 15:11:53 -04:00
|
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
2011-02-07 13:28:09 -05:00
|
|
|
});
|
|
|
|
|
2011-02-13 11:26:24 -05:00
|
|
|
test('new Size(new Point(10, 20))', function() {
|
2011-02-07 13:28:09 -05:00
|
|
|
var size = new Size(new Point(10, 20));
|
2011-05-21 15:11:53 -04:00
|
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
2011-02-07 13:28:09 -05:00
|
|
|
});
|
|
|
|
|
2011-02-13 11:26:24 -05:00
|
|
|
test('new Size({ x: 10, y: 20})', function() {
|
2011-02-07 13:28:09 -05:00
|
|
|
var size = new Size({x: 10, y: 20});
|
2011-05-21 15:11:53 -04:00
|
|
|
equals(size.toString(), '{ width: 10, height: 20 }');
|
2011-02-07 13:28:09 -05:00
|
|
|
});
|