<commit_before>collisions = TestCase("collisions");

collisions.prototype.testMiss = function() {
	var miss = nitch.collision.AABB({
		width: 200,
		height: 100,
		x: 30,
		y: 50	
		}, {
		width: 100,
		height: 200,
		x: 800,
		y: 500
	});

	assertFalse(miss);
}

collisions.prototype.testCollide = function() {
	var collide = nitch.collision.AABB({
		width: 200,
		height: 100,
		x: 30,
		y: 50	
		}, {
		width: 100,
		height: 200,
		x: 25,
		y: 40
	});
	
	assertObject(collide);
	assertEquals('right', collide.dir);
	assertArray(collide.pv);
	assertEquals(95, collide.pv[0]);
	assertEquals(-110, collide.pv[1]);
}
<commit_msg>Test for when objects touch<commit_after>collisions = TestCase("collisions");

collisions.prototype.testMiss = function() {
	var miss = nitch.collision.AABB({
		width: 200,
		height: 100,
		x: 30,
		y: 50	
		}, {
		width: 100,
		height: 200,
		x: 800,
		y: 500
	});

	assertFalse(miss);
}

collisions.prototype.testCollide = function() {
	var collide = nitch.collision.AABB({
		width: 200,
		height: 100,
		x: 30,
		y: 50	
		}, {
		width: 100,
		height: 200,
		x: 25,
		y: 40
	});
	
	assertObject(collide);
	assertEquals('right', collide.dir);
	assertArray(collide.pv);
	assertEquals(95, collide.pv[0]);
	assertEquals(-110, collide.pv[1]);
}

collisions.prototype.testTouching = function() {
	var touch = nitch.collision.AABB({
		width: 200,
		height: 100,
		x: 30,
		y: 50	
		}, {
		width: 200,
		height: 100,
		x: 230,
		y: 150
	});
	
	assertObject(touch);
	assertEquals('bottom', touch.dir);
	assertArray(touch.pv);
	assertEquals(0, touch.pv[0]);
	assertEquals(0, touch.pv[1]);
}

{'fraction_non_alphanumeric': 0.16759776536312848, 'fraction_numerical': 0.07697082557417753, 'mean_word_length': 3.658959537572254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '197607', 'n_tokens_mistral': 805, 'n_tokens_neox': 635, 'n_words': 139}