You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/06/20 03:45:53 UTC

spec commit: [CB-3488] - Fixed Globalization test to add check or Globalization error constants

Updated Branches:
  refs/heads/master c98b753a4 -> ed3f3d080


[CB-3488] - Fixed Globalization test to add check or Globalization error
constants

- added new jasmine test or 4 error types
- added jasmine expect to validate error types and values


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/ed3f3d08
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/ed3f3d08
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/ed3f3d08

Branch: refs/heads/master
Commit: ed3f3d080c9fb0a31bc30c56b1842216e1872b8a
Parents: c98b753
Author: ldeluca <ld...@us.ibm.com>
Authored: Thu May 23 14:57:49 2013 -0400
Committer: Fil Maj <ma...@gmail.com>
Committed: Wed Jun 19 18:45:43 2013 -0700

----------------------------------------------------------------------
 autotest/tests/globalization.tests.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/ed3f3d08/autotest/tests/globalization.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/globalization.tests.js b/autotest/tests/globalization.tests.js
index 01596ae..8413c15 100644
--- a/autotest/tests/globalization.tests.js
+++ b/autotest/tests/globalization.tests.js
@@ -48,6 +48,16 @@ describe('Globalization (navigator.globalization)', function () {
         });
     });
     
+    describe('Globalization Constants (window.Globalization)', function () {
+        it("globalization.spec.1 should exist", function() {
+            expect(window.GlobalizationError).toBeDefined();
+            expect(window.GlobalizationError.UNKNOWN_ERROR).toBe(0);
+            expect(window.GlobalizationError.FORMATTING_ERROR).toBe(1);
+            expect(window.GlobalizationError.PARSING_ERROR).toBe(2);
+            expect(window.GlobalizationError.PATTERN_ERROR).toBe(3);
+        });
+    });
+    
     describe("dateToString", function() {
         it("globalization.spec.1 should exist", function() {
             expect(typeof navigator.globalization.dateToString).toBeDefined();