<commit_before>﻿define([
	"intern!object", "intern/chai!assert", "../utils/testUtils", "dcl/advise", "dcolor/Color", "dcolor/utils",
	"gfx/gfx", "gfx/matrix", "gfx/fx"
], function (registerSuite, assert, tu, advise, Color, colorUtils, gfx, matrix, fx) {

	var surface, rect, text;

	var duration = 1000;

	function testAnim(testSuite, anim, testFunction) {
		var d = testSuite.async(anim.duration * 2);
		advise.after(anim, "onAnimate", function () {
			try {
				testFunction(anim.easing(anim._percent));
			} catch (err) {
				d.reject(err);
			}
		});
		advise.after(anim, "onEnd", function () {
			d.resolve();
		});
		anim.play();
		return d;
	}

	tu.registerSuite({
		name: "Animation effects",
		setup: function () {
			surface = tu.createSurface(500, 500);

			rect = surface.createRect({x: 100, y: 100, width: 300, height: 300});
			rect.fill = "yellow";
			rect.stroke = {
				color: "green",
				width: 5,
				join: "round"
			};
			text = surface.createText({x: 250, y: 250, text: "Hello!", align: "middle"});
			text.fill = "black";
			text.font = {family: "serif", size: "10pt"};<commit_msg>Increased timeout of animation tests<commit_after>﻿define([
	"intern!object", "intern/chai!assert", "../utils/testUtils", "dcl/advise", "dcolor/Color", "dcolor/utils",
	"gfx/gfx", "gfx/matrix", "gfx/fx"
], function (registerSuite, assert, tu, advise, Color, colorUtils, gfx, matrix, fx) {

	var surface, rect, text;

	var duration = 1000;

	function testAnim(testSuite, anim, testFunction) {
		var d = testSuite.async(anim.duration * 4);
		advise.after(anim, "onAnimate", function () {
			try {
				testFunction(anim.easing(anim._percent));
			} catch (err) {
				d.reject(err);
			}
		});
		advise.after(anim, "onEnd", function () {
			d.resolve();
		});
		anim.play();
		return d;
	}

	tu.registerSuite({
		name: "Animation effects",
		setup: function () {
			surface = tu.createSurface(500, 500);

			rect = surface.createRect({x: 100, y: 100, width: 300, height: 300});
			rect.fill = "yellow";
			rect.stroke = {
				color: "green",
				width: 5,
				join: "round"
			};
			text = surface.createText({x: 250, y: 250, text: "Hello!", align: "middle"});
			text.fill = "black";
			text.font = {family: "serif", size: "10pt"};
{'fraction_non_alphanumeric': 0.18987908643081056, 'fraction_numerical': 0.028660994178235557, 'mean_word_length': 3.7230443974630023, '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': '1152861', 'n_tokens_mistral': 965, 'n_tokens_neox': 797, 'n_words': 189}