[common][systeminfo][fix assert_throws description] 78/212378/3
authorqunfang.lin <qunfang.lin@samsung.com>
Wed, 21 Aug 2019 19:10:31 +0000 (03:10 +0800)
committerQunfang Lin <qunfang.lin@samsung.com>
Wed, 21 Aug 2019 03:01:29 +0000 (03:01 +0000)
-increase readability for reporting errors

Change-Id: Ic68722604527d75230d217f9c5f95dddb4a0f3a8
Signed-off-by: qunfang.lin <qunfang.lin@samsung.com>
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_errorCallback_invalid_cb.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueArrayChangeListener_successCallback_invalid_cb.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_addPropertyValueChangeListener_options_invalid.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getCount_misarg.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_errorCallback_invalid_cb.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_misarg.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValueArray_successCallback_invalid_cb.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_errorCallback_invalid_cb.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_missarg.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_getPropertyValue_successCallback_missarg.html
common/tct-systeminfo-tizen-tests/systeminfo/SystemInfo_removePropertyValueChangeListener_listenerId_TypeMismatch.html

index 409dc4e31ca3cc996bd46c6352c8eefa3aea480b..24e78930b2f1494ca8ca8354c9af489b81108867 100755 (executable)
@@ -53,7 +53,7 @@ t.step(function () {
     assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
         tizen.systeminfo.addPropertyValueArrayChangeListener("STORAGE", addPropertyValueArrayChangeListenerSuccess,
             {highThreshold: 0, lowThreshold: 1}, addPropertyValueArrayChangeListenerError);
-    }, TYPE_MISMATCH_EXCEPTION + " should be thrown - given incorrect error callback.");
+    }, "TypeMismatchError should be thrown - given incorrect error callback.");
     t.done();
 });
 
index 178c1656e81de9645bdb54831a9131fb2d864bc4..adc5ee907a80777c6d514e28bb317327f49b4b35 100755 (executable)
@@ -47,7 +47,7 @@ t.step(function () {
 
     assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
         tizen.systeminfo.addPropertyValueArrayChangeListener("STORAGE", addPropertyValueArrayChangeListenerSuccess);
-    }, TYPE_MISMATCH_EXCEPTION + " should be thrown - given incorrect success callback.");
+    }, "TypeMismatchError should be thrown - given incorrect success callback.");
     t.done();
 });
 
index bf2bf33f85e7fe7fa4fa2dead0d4bb6a26faccfe..044bbcd6eb47206bd0f63f5b46126b8aa654837b 100755 (executable)
@@ -44,12 +44,11 @@ t.step(function () {
     addPropertyValueChangeListenerSuccess = t.step_func(function (property) {
         assert_unreached("Should not be here.");
     });
-       
 
-       assert_throws(INVALID_VALUES_EXCEPTION, function () {
-    for (i = 0;  i < systemInfoPropertyId.length; i++) {
-        tizen.systeminfo.addPropertyValueChangeListener(systemInfoPropertyId[i], addPropertyValueChangeListenerSuccess, {highThreshold: -1, lowThreshold: 1});   
-    }}, INVALID_VALUES_EXCEPTION + " should be thrown - given incorrect error callback.");
+    assert_throws(INVALID_VALUES_EXCEPTION, function () {
+        for (i = 0;  i < systemInfoPropertyId.length; i++) {
+            tizen.systeminfo.addPropertyValueChangeListener(systemInfoPropertyId[i], addPropertyValueChangeListenerSuccess, {highThreshold: -1, lowThreshold: 1});   
+    }}, "InvalidValuesError should be thrown - given incorrect error callback.");
     t.done();
 });
 
index e2ef6fbb1f54a57234425f8859b2cc3b201351b3..7653f9fb7bebdee3cb8be65ececf2632a13c1149 100755 (executable)
@@ -38,7 +38,7 @@ Author:
 test(function () {
     assert_throws( TYPE_MISMATCH_EXCEPTION, function () {
         tizen.systeminfo.getCount();
-    }, TYPE_MISMATCH_EXCEPTION + " should be thrown");
+    }, "TypeMismatchError should be thrown");
 }, document.title);
 
 </script>
index 9f6e73f82ca3a3614231415d6edba3d307f1545d..c42795caf3739a845c7da34720bd206625591c11 100755 (executable)
@@ -54,7 +54,7 @@ t.step(function () {
     for (i = 0;  i < systemInfoPropertyId.length; i++) {
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
             tizen.systeminfo.getPropertyValueArray(systemInfoPropertyId[i], getPropertyValueArraySuccess, getPropertyValueArrayError);
-        }, TYPE_MISMATCH_EXCEPTION + " should be thrown");
+        }, "TypeMismatchError should be thrown");
     }
     t.done();
 });
index 92c104519dd97b2b62998920aef52d62e5bae8a0..b4fab9552d65173e4a2b02edafa4ec857ff08714 100755 (executable)
@@ -37,7 +37,7 @@ Author:
 test(function () {
     assert_throws( TYPE_MISMATCH_EXCEPTION, function () {
         tizen.systeminfo.getPropertyValueArray();
-    }, TYPE_MISMATCH_EXCEPTION + " should be thrown");
+    }, "TypeMismatchError should be thrown");
 }, document.title);
 
 </script>
index 22590cd3e8fccfb1d09fa89cddf3aafc58110456..7230520363e17ed54d0d29a6f703c781bd94e40a 100755 (executable)
@@ -25,6 +25,7 @@ Author:
 <script src="support/unitcommon.js"></script>
 <script src="support/systeminfo_common.js"></script>
 </head>
+<body>
 <div id="log"></div>
 <script>
 //==== TEST: SystemInfo_getPropertyValueArray_successCallback_invalid_cb
@@ -49,7 +50,7 @@ t.step(function () {
     for (i = 0;  i < systemInfoPropertyId.length; i++) {
         assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
             tizen.systeminfo.getPropertyValueArray(systemInfoPropertyId[i], getPropertyValueArraySuccess);
-        }, TYPE_MISMATCH_EXCEPTION + " should be thrown - given incorrect success callback.");
+        }, "TypeMismatchError should be thrown - given incorrect success callback.");
     }
     t.done();
 });
index 89ef6f58638eadf843dac5403c9906296b0809d8..ea7591ace0204d0ec6c283c661c5e4ad2798ea5a 100755 (executable)
@@ -53,7 +53,7 @@ t.step(function () {
         assert_throws(TYPE_MISMATCH_EXCEPTION,
             function () {
                 tizen.systeminfo.getPropertyValue(systemInfoPropertyId[i], getPropertyValueSuccess, getPropertyValueError);
-            }, TYPE_MISMATCH_ERR + " should be thrown");
+            }, "TypeMismatchError should be thrown");
     }
     t.done();
 });
index 5a4045257bca42f26618fc9de702bbae6c50515a..9fb2a7ac02a80b899952ee955b1e4c05b6cfccad 100755 (executable)
@@ -37,7 +37,7 @@ test(function () {
     assert_throws( TYPE_MISMATCH_EXCEPTION,
         function () {
             tizen.systeminfo.getPropertyValue();
-        }, TYPE_MISMATCH_ERR + " should be thrown");
+        }, "TypeMismatchError should be thrown");
 }, document.title);
 
 </script>
index cd521607f87e9f9bd44c1a9650aeb9bdab0a6bde..0405b83b84ea9b8ba7b78c55b8b03a6f85c5b17a 100755 (executable)
@@ -44,7 +44,7 @@ test(function () {
         assert_throws(TYPE_MISMATCH_EXCEPTION,
             function () {
                 tizen.systeminfo.getPropertyValue(systemInfoPropertyId[i]);
-            }, TYPE_MISMATCH_ERR + " should be thrown");
+            }, "TypeMismatchError should be thrown");
     }
 }, document.title);
 
index 72d60d56636d84a041c73eb5378f4d73eabb1dda..ebb051eb348eda51a4419c9ac4d0d9c579704c6b 100755 (executable)
@@ -45,7 +45,7 @@ test(function () {
             assert_throws(INVALID_VALUES_EXCEPTION,
                 function () {
                     tizen.systeminfo.removePropertyValueChangeListener(listenerId);
-                }, InvalidValuesError + " should be thrown");
+                }, "InvalidValuesError should be thrown");
         }
 }, document.title);