Sha256: fb7dd432a8906be590032fdc9968ce5fbd02f2b4bc7ba1c0bb05bb23d7744ae9

Contents?: true

Size: 1.38 KB

Versions: 7

Compression:

Stored size: 1.38 KB

Contents

dojo.provide("dojox.date.tests.IslamicDate");
dojo.require("dojox.date.IslamicDate");
dojo.require("dojo.date");

tests.register("dojox.date.tests.IslamicDate", 
	[
		{
			// Test formatting and parsing of dates in various locales pre-built in dojo.cldr
			// NOTE: we can't set djConfig.extraLocale before bootstrapping unit tests, so directly
			// load resources here for specific locales:

			name: "date.locale",
			setUp: function(){
				var partLocaleList = ["en-us"];

				dojo.forEach(partLocaleList, function(locale){
					dojo.requireLocalization("dojo.cldr", "islamic", locale);
				});
			},
			runTest: function(t){
			},
			tearDown: function(){
				//Clean up bundles that should not exist if
				//the test is re-run.
				delete dojo.cldr.nls.islamic;
			}
		},
		{
			name: "toGregorian",
			runTest: function(t){
				var dateIslamic = new dojox.date.IslamicDate(1429,11,20); // Dec 19, 2008 -- is this right??
				var dateGregorian = dateIslamic.toGregorian();
				t.is(0, dojo.date.compare(new Date(2008, 11, 19), dateGregorian, "date"));
				// add exhaustive tests here
			}
		}/*,
		{
			name: "fromGregorian",
			runTest: function(t){
				var dateIslamic = new dojox.date.IslamicDate();
				var dateGregorian = new Date(2008,10,12);
				dateIslamic.fromGregorian(dateGregorian);
				t.is(0, dojo.date.compare(new Date(...), dateIslamic, "date"));
				// add more tests here
			}
		}*/
	]
);

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dojo-pkg-1.132.0 data/dojo-release-1.3.2-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.130.0 data/dojo-release-1.3.0-src/dojox/date/tests/IslamicDate.js
dojo-pkg-1.131.0 data/dojo-release-1.3.1-src/dojox/date/tests/IslamicDate.js