[Time] code cleanup
authorPiotr Szydelko <p.szydelko@samsung.com>
Fri, 20 Sep 2013 14:04:20 +0000 (16:04 +0200)
committerPiotr Szydelko <p.szydelko@samsung.com>
Tue, 24 Sep 2013 15:00:53 +0000 (17:00 +0200)
Change-Id: If6a8d44e67704b1ec1812c4847cfa233779ac416

30 files changed:
tct-time-tizen-tests/time/TZDate_addDuration_duration_invalid_obj.html
tct-time-tizen-tests/time/TZDate_difference_other_invalid_obj.html
tct-time-tizen-tests/time/TZDate_earlierThan_other_invalid_obj.html
tct-time-tizen-tests/time/TZDate_equalsTo_other_invalid_obj.html
tct-time-tizen-tests/time/TZDate_laterThan_other_invalid_obj.html
tct-time-tizen-tests/time/TZDate_toDateString.html
tct-time-tizen-tests/time/TZDate_toLocaleDateString.html
tct-time-tizen-tests/time/TZDate_toLocaleString.html
tct-time-tizen-tests/time/TZDate_toLocaleTimeString.html
tct-time-tizen-tests/time/TZDate_toString.html
tct-time-tizen-tests/time/TZDate_toTimeString.html
tct-time-tizen-tests/time/TimeDuration_difference_other_invalid_obj.html
tct-time-tizen-tests/time/TimeDuration_equalsTo_other_invalid_obj.html
tct-time-tizen-tests/time/TimeDuration_greaterThan_missarg.html
tct-time-tizen-tests/time/TimeDuration_greaterThan_other_invalid_obj.html
tct-time-tizen-tests/time/TimeDuration_lessThan_other_invalid_obj.html
tct-time-tizen-tests/time/Time_TZDate_difference_compareWithCharacter.html
tct-time-tizen-tests/time/Time_TZDate_earlierThan_character.html
tct-time-tizen-tests/time/Time_TZDate_earlierThan_number.html
tct-time-tizen-tests/time/Time_TZDate_earlierThan_stringTZDate.html
tct-time-tizen-tests/time/Time_TZDate_equalsTo_character.html
tct-time-tizen-tests/time/Time_TZDate_equalsTo_number.html
tct-time-tizen-tests/time/Time_TZDate_getMilliseconds.html
tct-time-tizen-tests/time/Time_TZDate_getUTCMilliseconds.html
tct-time-tizen-tests/time/Time_TZDate_laterThan_character.html
tct-time-tizen-tests/time/Time_TZDate_laterThan_number.html
tct-time-tizen-tests/time/Time_TZDate_setMilliseconds_normal.html
tct-time-tizen-tests/time/Time_TZDate_toTimezone_invalid.html
tct-time-tizen-tests/time/Time_TZDate_toTimezone_null.html
tct-time-tizen-tests/time/support/time_common.js

index e6aaa0b1dab6f943494811c2e7da31da7b225138..c52f5ce055c18eb7f900526a221dcce490acae75 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTZDate, currentTimeDuration = [], exceptionName = "TypeMismatchError";
+    var currentTZDate, currentTimeDuration = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTimeDuration[0] = {length: 2, unit: "MINS"};
     currentTZDate = tizen.time.getCurrentDateTime();
index 44702b79c496482804b9ad4b0068d8023e977438..6208d0a4607398952e322fb3b6d6904e8130012b 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTZDate = [], exceptionName = "TypeMismatchError";
+    var currentTZDate = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTZDate[0] = tizen.time.getCurrentDateTime();
     currentTZDate[1] = {};
index 65038af2b1a5135e3f360a4e7be1aab92b497f8b..2bd49340a026d034b33276a79bdea871c5fb8fac 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTZDate = [], exceptionName = "TypeMismatchError";
+    var currentTZDate = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTZDate[0] = tizen.time.getCurrentDateTime();
     currentTZDate[1] = {};
index 3bbdf045e12ee485e0de1214bc856af8e99ff64e..422b786f6a5737d89f481f1df91e8b91b6b0e534 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTZDate = [], exceptionName = "TypeMismatchError";
+    var currentTZDate = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTZDate[0] = tizen.time.getCurrentDateTime();
     currentTZDate[1] = {};
index 033f8257afb739d68e408851fa5e94c41c95d0af..e7527db7e469c27ae021dccb4ccfd8702efec9e1 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTZDate = [], exceptionName = "TypeMismatchError";
+    var currentTZDate = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTZDate[0] = tizen.time.getCurrentDateTime();
     currentTZDate[1] = {};
index 3ebc42d2463649bce3bd455d8851df8e66d5c7b2..dc44083d8c898a766592c64e29ce38dd54694343 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toDateString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toDateString");
 
 </script>
index 4905b3bf8d097b9c48fa7f1784e5fb847a1a8e3b..53704bf992ef63b73aad0ad617246cf6dd06ad83 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toLocaleDateString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toLocaleDateString");
 
 </script>
index 72cc58a27d50bc6e2cadf2cbe8ad007d14f14ee1..fef7d3e0edd4e869e57616438fe6507475a88b9d 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toLocaleString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toLocaleString");
 
 </script>
index 5d3e6f8e861705e2b58b5580e16710f5588e1465..e0d859e40f0c32997ca67a9f2b1495db8fabf47f 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toLocaleTimeString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toLocaleTimeString");
 
 </script>
index e0905baae755da95c89b428198d93f7a07e18bb1..c5f118a3a95d89b40a6be3b1618950b8493fa879 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toString");
 
 </script>
index 9c750bd9a071e31f3ee965c54b27227f24b95383..7a35bb3982528211321993875e662c3f9dc044b3 100644 (file)
@@ -38,7 +38,7 @@ test(function () {
     var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue = null;
     returnedValue = currentTZDate.toTimeString();
     assert_type(returnedValue, "string", "type check");
-    assert_not_equals(returnedValue, null, "null check");
+    assert_not_equals(returnedValue, "", "returned");
 }, "TZDate_toTimeString");
 
 </script>
index ce90ceab55cf0726c3ed4adf59ab096922b9c8c5..b8e57a0cf51264b446cdfbd9b03e11283c495afc 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTimeDuration = [], exceptionName = "TypeMismatchError";
+    var currentTimeDuration = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTimeDuration[0] = new tizen.TimeDuration(1, "DAYS");
     currentTimeDuration[1] = {length: 2, unit: "MINS"};
index 1b5d7b688668de9f88badc8e7218949d6454d665..d8156f6f0178be9f18972b5783aa25a0baa02e09 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTimeDuration = [], exceptionName = "TypeMismatchError";
+    var currentTimeDuration = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTimeDuration[0] = new tizen.TimeDuration(1, "DAYS");
     currentTimeDuration[1] = {length: 2, unit: "MINS"};
index 2e8c4339437476b730624249a48200c491e810f8..27f4ccf08d7c2bac31bba11003a6f3fac9c8e739 100644 (file)
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MMA
 test(function () {
     var currentTimeDuration = new tizen.TimeDuration(1, "DAYS");
-    assert_throws({name: "TypeMismatchError"},
+    assert_throws({name: TYPE_MISMATCH_ERR},
         function () {
             currentTimeDuration.greaterThan();
         });
index 46dad8edbf44e82c67e16cc28d07196e0cda20da..b509bdba14527d5b9b22366cc89c3da82a17f2f9 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTimeDuration = [], exceptionName = "TypeMismatchError";
+    var currentTimeDuration = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTimeDuration[0] = new tizen.TimeDuration(1, "DAYS");
     currentTimeDuration[1] = {length: 2, unit: "MINS"};
index 2b7a6e9ea55cc84a5f6f9f92e7a6cddb84bb08df..2808d09f97ff47f27314828cf392ea144c438da1 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MTO
 test(function () {
-    var currentTimeDuration = [], exceptionName = "TypeMismatchError";
+    var currentTimeDuration = [], exceptionName = TYPE_MISMATCH_ERR;
 
     currentTimeDuration[0] = new tizen.TimeDuration(1, "DAYS");
     currentTimeDuration[1] = {length: 2, unit: "MINS"};
index f8c790e92c0702ae435a54d533ef1f98bc6dbec0..9f21a2f88faa8de622c61fb8fc04986cd24bf8ef 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().difference("abcd");
         }, "Specific TypeMismatchError exception.");
index f476a9633b4dee139698d8d5a897cc0e72c80614..daf1159a102754111b29798cf6532f3fca78e6be 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().earlierThan("abcd");
         }, "Specific TypeMismatchError exception.");
index 4a4c9b05fd3811a6c7b7f0c6c4ec0183cec5b315..3e611c12e0fcc1ccc345059f6819fd9029374a16 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().earlierThan(123);
         }, "Specific TypeMismatchError exception.");
index e3979714e9c1f7f986895ae5f1cc49a9a509910b..3718593fe86044a2d126ba64e99466a7c5fb4cea 100644 (file)
@@ -48,7 +48,7 @@ Authors:
 //==== TEST_CRITERIA MC
 test(function () {
     var tzStr = tizen.time.getCurrentDateTime().toString();
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().earlierThan(tzStr);
         }, "Specific TypeMismatchError exception.");
index adaf41e02781c59f6068d7004ae5be69a445d277..b0b25abd5dfbc46164936527512b06a59a749127 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().equalsTo("abcd");
         }, "Specific TypeMismatchError exception.");
index 2e85339431d56dd522ace219fd325d8dac928845..78fdc2036682e7a55ca79ab7860f17c32b81e1b2 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().equalsTo(123);
         }, "Specific TypeMismatchError exception.");
index 96dfa7b033d156f59308c6228d2d1743b65809f9..9ac09c165bcdec8a0b93f9a39053b8302b56b924 100644 (file)
@@ -51,7 +51,7 @@ test(function () {
 
     exp_ms = myDate.getMilliseconds();
     ms = tizen.time.getCurrentDateTime().getMilliseconds();
-    assert_gap_less_than(ms, exp_ms, 10);
+    assert_approx_equals(ms, exp_ms, 10, "getMilliseconds()");
 }, "Time_TZDate_getMilliseconds");
 
 </script>
index 4d6eb78ca5ee40db7f888c758f82cfecee77533a..e5774fab54f2b97100869a2e75373876ef24d885 100644 (file)
@@ -52,7 +52,7 @@ test(function () {
     exp_UTCMs = myDate.getUTCMilliseconds();
     UTCMs = tizen.time.getCurrentDateTime().getUTCMilliseconds();
 
-    assert_gap_less_than(UTCMs, exp_UTCMs, 10, "milliseconds check");
+    assert_approx_equals(UTCMs, exp_UTCMs, 10, "milliseconds check");
 }, "Time_TZDate_getUTCMilliseconds");
 
 </script>
index 15f6d72bbd720011d6d771013a541f1d97d8e98f..447196bfe6df88cc1011b578c2b8ddc551fa1236 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MC
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().laterThan("abcd");
         }, "Specific TypeMismatchError exception.");
index e3070891a68c6231d9909a52430af3a06136a5db..b486533b101546ee8a0cec8acdd6f8d6ab62f08d 100644 (file)
@@ -47,7 +47,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
 //==== TEST_CRITERIA MMINA MR
 test(function () {
-    assert_throws("TYPE_MISMATCH_ERR",
+    assert_throws({name: "TypeMismatchError"},
         function () {
             tizen.time.getCurrentDateTime().laterThan(123);
         }, "Specific TypeMismatchError exception.");
index e03296653a52de0c9fb6343d3fa25f2851518d0f..7e8318d86eeb171c47bdc996b9fe5083e5cf8758 100644 (file)
@@ -53,7 +53,7 @@ test(function () {
 
     dt.setMilliseconds(set_ms);
     msAfterSet = dt.getMilliseconds();
-    assert_gap_less_than(msAfterSet, set_ms, 10);
+    assert_approx_equals(msAfterSet, set_ms, 10, "getMilliseconds()");
 }, "Time_TZDate_setMilliseconds_normal");
 
 </script>
index ea297546f7c379e9eb8f99d116487291ca7e5701..997255bb1e0393bbef2286bb681ce6fa559f51f0 100644 (file)
@@ -47,13 +47,10 @@ Authors:
 //==== TEST_CRITERIA
 test(function () {
     var tzid, timezone;
-    try {
+    assert_throws({ name: INVALID_VALUES_ERR }, function () {
         tzid = "ab";
         timezone = tizen.time.getCurrentDateTime().toTimezone(tzid);
-        assert_true(false, "Should throw an exception");
-    } catch (e) {
-        assert_equals(e.name,"InvalidValuesError","error message is " + e.message);
-    }
+    });
 }, "Time_TZDate_toTimezone_invalid");
 
 </script>
index fe1069e7d2193378ad12947be9f7221f5a60b4b4..48d049fd59f5f14e2211cc750ed66321b45718b9 100644 (file)
@@ -47,13 +47,10 @@ Authors:
 //==== TEST_CRITERIA
 test(function () {
     var tzid, timezone;
-    try {
+    assert_throws({ name: INVALID_VALUES_ERR }, function () {
         tzid = null;
         timezone = tizen.time.getCurrentDateTime().toTimezone(tzid);
-        assert_true(false,"Should throw an exception");
-    } catch (e) {
-        assert_equals(e.name,"InvalidValuesError","error message is" +e.message);
-    }
+    });
 }, "Time_TZDate_toTimezone_null");
 
 </script>
index 39f044377b991cc6dc943c67382246f195d18fb2..0aed54920b0b32ad39232b6d6d69b04bcc0c57da 100644 (file)
@@ -61,168 +61,3 @@ var date = new tizen.TZDate(
 );
 
 var testAdditionalParamArray = [ERROR_NUM, null, undefined];
-// var currentDate = new tizen.TZDate();
-
-function presenceTest() {
-    assert_true(tizen, "Checking tizen object");
-}
-
-function checkTZDate(count, paramTZDate, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
-    assert_true(paramTZDate instanceof tizen.TZDate, "checkTZDate() paramTZDate):");
-    if (count == 0) {
-        return;
-    }
-
-    switch (count) {
-    case 1:
-        assert_equals(arg1, paramTZDate.getTimezone(), "checkTZDate() timezone");
-        break;
-    case 3:
-    case 4:
-    case 5:
-    case 6:
-    case 7:
-    case 8:
-        assert_equals(arg1, paramTZDate.getFullYear(), "checkTZDate() year");
-        assert_equals(arg2, paramTZDate.getMonth(), "checkTZDate() month");
-        assert_equals(arg3, paramTZDate.getDate(), "checkTZDate() date");
-
-        if (count > 3) {
-            assert_equals(arg4, paramTZDate.getHours(), "checkTZDate() hours");
-        }
-
-        if (count > 4) {
-            assert_equals(arg5, paramTZDate.getMinutes(), "checkTZDate() minutes");
-        }
-
-        if (count > 5) {
-            assert_equals(arg6, paramTZDate.getSeconds(), "checkTZDate() seconds");
-        }
-
-        if (count > 6) {
-            assert_equals(arg7, paramTZDate.getMilliseconds(), "checkTZDate() milliseconds");
-        }
-
-        if (count > 7) {
-            assert_equals(arg8, paramTZDate.getTimezone(), "checkTZDate() timezone");
-        }
-
-        break;
-    }
-}
-
-function checkValidParamTZDate() {
-    try {
-        assert_true(!isUndefined(new tizen.TZDate(ERROR_NUM)), "checkValidParamTZDate new tizen.TZDate(ERROR_NUM) : ");
-        console.error("checkValidParamTZDate expected error (expected : [" +  TYPE_MISMATCH_ERR + "] but NoError)");
-    } catch (e) {
-        assert_equals("checkValidParamTZDate() new tizen.TZDate(ERROR_NUM) error", e.name, TYPE_MISMATCH_ERR);
-    }
-
-    try {
-        assert_true(!isUndefined(new tizen.TZDate(new Date(), ERROR_NUM)), "checkValidParamTZDate new tizen.TZDate(new Date(), ERROR_NUM) : ");
-        console.error("checkValidParamTZDate expected error (expected : [" +  INVALID_VALUES_ERR + "] but NoError)");
-    } catch (e) {
-        assert_equals("checkValidParamTZDate() new tizen.TZDate(new Date(), ERROR_NUM) error", e.name, INVALID_VALUES_ERR);
-    }
-
-    try {
-        TestEngine.test("checkValidParamTZDate new tizen.TZDate(expected_year, expected_month, expected_date, expected_hours, expected_minutes, expected_seconds, expected_milliseconds,  ERROR_NUM) : ", !isUndefined(new tizen.TZDate(expected_year, expected_month, expected_date, expected_hours, expected_minutes, expected_seconds, expected_milliseconds, ERROR_NUM)));
-        console.error("checkValidParamTZDate expected error (expected : [" +  INVALID_VALUES_ERR + "] but NoError)");
-    } catch (e) {
-        assert_equals("checkValidParamTZDate() new tizen.TZDate(expected_year, expected_month, expected_date, expected_hours, expected_minutes, expected_seconds, expected_milliseconds, ERROR_NUM) error", e.name, INVALID_VALUES_ERR);
-    }
-}
-
-function compareDate(date, tzdate, timezone) {
-    assert_equals(date.getFullYear(), tzdate.getFullYear(), "compareDate() year");
-    assert_equals(date.getMonth(), tzdate.getMonth(), "compareDate() month");
-    assert_equals(date.getDate(), tzdate.getDate(), "compareDate() day");
-    assert_equals(date.getHours(), tzdate.getHours(), "compareDate() hours");
-    assert_equals(date.getMinutes(), tzdate.getMinutes(), "compareDate() mins");
-    assert_equals(date.getSeconds(), tzdate.getSeconds(), "compareDate() sec");
-    assert_equals(date.getMilliseconds(), tzdate.getMilliseconds(), "compareDate() millisec");
-    if (!isUndefined(timezone)) {
-        assert_equals(timezone, tzdate.getTimezone(), "compareDate() timezone");
-    }
-}
-
-function checkTimeDuration(duration, expected_length, expected_unit) {
-    assert_true(duration instanceof tizen.TimeDuration, "checkTimeDuration() duration instanceof tizen.TimeDuration :");
-    if (isNull(expected_unit)) {
-        expected_unit = "MSECS";
-    }
-
-    assert_type(duration.length, "number", "duration length");
-    assert_type(duration.unit, "string", "duration unit");
-    assert_equals(expected_length, duration.length, "checkTimeDuration() length");
-    assert_equals(expected_unit, duration.unit, "checkTimeDuration() unit");
-}
-
-
-
-
-
-function assert_gap_less_than(actual, expect, distance){
-    if( Math.abs(parseInt(actual-expect))<=distance ){
-        assert_true(true);
-    }else
-        assert_true(false)
-}
-
-function FailTest()
-{
-    t.step(function() { assert_true(false); } );
-    t.done();
-}
-
-/*
-function assert_is_timezone(actual) {
-    for (var i in _timezone_fields) {
-        assert_own_property(actual, i);
-    }
-}
-
-function assert_tzdate_same_as(actual, expected) {
-    for (var field in _tzdate_fields) {
-        _compare_field(actual[field], expected[field], field, _tzdate_fields[field]);
-    }
-}
-
-function assert_timezone_same_as(actual, expected) {
-    for (var field in _timezone_fields) {
-        _compare_field(actual[field], expected[field], field, _timezone_fields[field]);
-    }
-}
-
-
-function assert_contact_same_as(actual, expected) {
-    for (var field in _contact_properties) {
-        _compare_field(actual[field], expected[field], field, _contact_properties[field]);
-    }
-}
-
-function _compare_field(actual, expected, fieldname, datatype) {
-    if (expected == null) {
-        assert_equals(actual, expected, "Comparing values of " + fieldname);    
-    } else if (datatype == "string" || datatype == "date" || datatype=="opaquestring") {
-        if (expected == null || datatype != "opaquestring") {
-            assert_equals(actual, expected, "Comparing values of " + fieldname);
-        }
-    } else if (datatype instanceof Array) {
-        for (var i in expected) {
-            _compare_field(actual[i], expected[i], fieldname, datatype[0]);
-        }
-    } else if (typeof(datatype)=='object') {
-        for (var i in  actual) {
-            assert_own_property(expected, i, "Unexpected property " + i + " in " + fieldname);
-            _compare_field(actual[i], expected[i], fieldname + "." + i, "string");
-        }
-        for (var j in expected) {
-            assert_own_property(actual, j, "Missing property " + j + " in " + fieldname);
-        }
-    } else {
-        assert_unreached( "Unknown datatype to compare:" + datatype);        
-    }
-}
-*/