<commit_before>var Jsonix = require("../../jsonix").Jsonix;

if (process.env.TZ === undefined) {
	process.env.TZ = 'UTC';
}

module.exports = {

	"PrintYear" : function(test) {
		var g = Jsonix.Schema.XSD.GYear.INSTANCE;

		test.equal('0001', g.print({ year : 1 }));
		test.equal('0010', g.print({ year : 10 }));
		test.equal('0101', g.print({ year : 101 }));
		test.equal('1010', g.print({ year : 1010 }));
		test.equal('-1234567', g.print({ year : -1234567 }));
		test.equal('1234567', g.print({ year : 1234567 }));
		test.equal('2013-05:00', g.print({ year : 2013, timezone : -300 }));
		test.equal('-2013+05:00', g.print({ year : -2013, timezone : 300 }));

		test.throws(function() {
			g.print(2013);
		});
		test.throws(function() {
			g.print({});
		});
		// quickfix
		// TODO -> validation in printYear
		test.throws(function() {
			g.print({
				year : 0
			});
		});
		test.throws(function() {
			g.print({
				year : '2013'
			});
		});
		test.throws(function() {
			g.print({
				year : 2013,
				timezone : '-05:00'
			});
		});<commit_msg>Issue #73. Removed the comment.<commit_after>var Jsonix = require("../../jsonix").Jsonix;

if (process.env.TZ === undefined) {
	process.env.TZ = 'UTC';
}

module.exports = {

	"PrintYear" : function(test) {
		var g = Jsonix.Schema.XSD.GYear.INSTANCE;

		test.equal('0001', g.print({ year : 1 }));
		test.equal('0010', g.print({ year : 10 }));
		test.equal('0101', g.print({ year : 101 }));
		test.equal('1010', g.print({ year : 1010 }));
		test.equal('-1234567', g.print({ year : -1234567 }));
		test.equal('1234567', g.print({ year : 1234567 }));
		test.equal('2013-05:00', g.print({ year : 2013, timezone : -300 }));
		test.equal('-2013+05:00', g.print({ year : -2013, timezone : 300 }));

		test.throws(function() {
			g.print(2013);
		});
		test.throws(function() {
			g.print({});
		});
		test.throws(function() {
			g.print({
				year : 0
			});
		});
		test.throws(function() {
			g.print({
				year : '2013'
			});
		});
		test.throws(function() {
			g.print({
				year : 2013,
				timezone : '-05:00'
			});
		});
{'fraction_non_alphanumeric': 0.23736157920077033, 'fraction_numerical': 0.09821858449687049, 'mean_word_length': 3.0271317829457365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '115659', 'n_tokens_mistral': 1024, 'n_tokens_neox': 783, 'n_words': 145}