<commit_before>/*
 * Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
 * http://paperjs.org/
 *
 * Copyright (c) 2011 - 2013, <NAME> & <NAME>
 * http://lehni.org/ & http://jonathanpuckey.com/
 *
 * Distributed under the MIT license. See LICENSE file for details.
 *
 * All rights reserved.
 */

module('Rectangle');
test('new Rectangle(new Point(10, 20), new Size(30, 40));', function() {
	var rect = new Rectangle(new Point(10, 20), new Size(30, 40));
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)});', function() {
	var rect = new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)});
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle([10, 20], [30, 40]);', function() {
	var rect = new Rectangle([10, 20], [30, 40]);
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle({from: [10, 20], to: [30, 40]});', function() {
	var rect = new Rectangle({from: [10, 20], to: [30, 40]});
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle(new Point(10, 20), new Point(30, 40));', function() {
	var rect = new Rectangle(new Point(10, 20), new Point(30, 40));<commit_msg>Fix test for Rectangle({from:,  to: }) constructor.<commit_after>/*
 * Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
 * http://paperjs.org/
 *
 * Copyright (c) 2011 - 2013, <NAME> & <NAME>
 * http://lehni.org/ & http://jonathanpuckey.com/
 *
 * Distributed under the MIT license. See LICENSE file for details.
 *
 * All rights reserved.
 */

module('Rectangle');
test('new Rectangle(new Point(10, 20), new Size(30, 40));', function() {
	var rect = new Rectangle(new Point(10, 20), new Size(30, 40));
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)});', function() {
	var rect = new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)});
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle([10, 20], [30, 40]);', function() {
	var rect = new Rectangle([10, 20], [30, 40]);
	equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');
});

test('new Rectangle({from: [10, 20], to: [30, 40]});', function() {
	var rect = new Rectangle({from: [10, 20], to: [30, 40]});
	equals(rect.toString(), '{ x: 10, y: 20, width: 20, height: 20 }');
});

test('new Rectangle(new Point(10, 20), new Point(30, 40));', function() {
	var rect = new Rectangle(new Point(10, 20), new Point(30, 40));
{'fraction_non_alphanumeric': 0.22255639097744362, 'fraction_numerical': 0.09022556390977443, 'mean_word_length': 4.441717791411043, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2848326', 'n_tokens_mistral': 1150, 'n_tokens_neox': 945, 'n_words': 316}