From dca3726bf17c3b80a9b56567dc30661d0a9fa25f Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:13:44 -0500 Subject: [PATCH 01/14] Update README.md --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e750b72..bfe1619 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,32 @@ # JSON-Java-unit-test Unit tests to validate the JSON-Java GitHub project code (https://github.com/douglascrockford/JSON-java).
+ Test harness: http://junit.org
Coverage: http://www.eclemma.org/
-Run individual tests using eclemma or the entire test suite using TestRunner
+ +Eclipse is the recommended development environment. +Run individual tests or *JunitTestSuite* using ~~EclEmma Coverage~~, or execute the *TestRunner* application directly.
+ +Test filenames should consist of the name of the module being tested, with the suffix "Test". +For example, *Cookie.java* is tested by *CookieTest.java*. +When adding a new unit test, don't forget to update *JunitTestSuite.java*. + +The fundamental issues with JSON-Java testing are: +* *JSONObjects* are unordered, making simple string comparison ineffective. +* Comparisons via equals() is not currently supported. Neither JSONArray nor JSONObject overrride hashCode() or equals(), so comparison defaults to the Object equals(), which is not useful. +* Access to the JSONArray and JSONObject internal containers for comparison is not currently available. +* JSONObject sometimes wraps entries in quotes, other times does not, complicating comparisons. + +When you start working on a test, add the empty file to the repository, so that others will know that test is taken. + +A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. + +| Test file name | Coverage | Comments | +| ------------- | ------------- | +| CookieTest.java | 97.5% | Completed | +| PropertyTest.java | 94.8% | Completed | +| CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | + Completed tests:
CDLTest.java
CookieTest.java
From 1bde00ed4c6b42add6702f82a06f80c8262f00d3 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:14:23 -0500 Subject: [PATCH 02/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfe1619..ee72386 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Test harness: http://junit.org
Coverage: http://www.eclemma.org/
Eclipse is the recommended development environment. -Run individual tests or *JunitTestSuite* using ~~EclEmma Coverage~~, or execute the *TestRunner* application directly.
+Run individual tests or *JunitTestSuite* using *EclEmma Coverage*, or execute the _TestRunner_ application directly.
Test filenames should consist of the name of the module being tested, with the suffix "Test". For example, *Cookie.java* is tested by *CookieTest.java*. From b0ce7f3bd94ae52c1efa5a797bf473201edd3ef6 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:15:46 -0500 Subject: [PATCH 03/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee72386..0e03195 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Test harness: http://junit.org
Coverage: http://www.eclemma.org/
Eclipse is the recommended development environment. -Run individual tests or *JunitTestSuite* using *EclEmma Coverage*, or execute the _TestRunner_ application directly.
+Run individual tests or JunitTestSuite using *EclEmma Coverage*, or execute the TestRunner application directly.
Test filenames should consist of the name of the module being tested, with the suffix "Test". For example, *Cookie.java* is tested by *CookieTest.java*. From 09b5562ad9b699db72d92400ec16e4f03f563012 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:18:56 -0500 Subject: [PATCH 04/14] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0e03195..1837be9 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,24 @@ Eclipse is the recommended development environment. Run individual tests or JunitTestSuite using *EclEmma Coverage*, or execute the TestRunner application directly.
Test filenames should consist of the name of the module being tested, with the suffix "Test". -For example, *Cookie.java* is tested by *CookieTest.java*. -When adding a new unit test, don't forget to update *JunitTestSuite.java*. +For example, Cookie.java is tested by CookieTest.java. +When adding a new unit test, don't forget to update JunitTestSuite.java. The fundamental issues with JSON-Java testing are: -* *JSONObjects* are unordered, making simple string comparison ineffective. -* Comparisons via equals() is not currently supported. Neither JSONArray nor JSONObject overrride hashCode() or equals(), so comparison defaults to the Object equals(), which is not useful. -* Access to the JSONArray and JSONObject internal containers for comparison is not currently available. -* JSONObject sometimes wraps entries in quotes, other times does not, complicating comparisons. +* JSONObjects are unordered, making simple string comparison ineffective. +* Comparisons via equals() is not currently supported. Neither JSONArray nor JSONObject overrride hashCode() or equals(), so comparison defaults to the Object equals(), which is not useful. +* Access to the JSONArray and JSONObject internal containers for comparison is not currently available. +* JSONObject sometimes wraps entries in quotes, other times does not, complicating comparisons. When you start working on a test, add the empty file to the repository, so that others will know that test is taken. A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. -| Test file name | Coverage | Comments | +| Test file name | Coverage | Comments | ------------- | ------------- | -| CookieTest.java | 97.5% | Completed | -| PropertyTest.java | 94.8% | Completed | -| CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | +| CookieTest.java | 97.5% | Completed +| PropertyTest.java | 94.8% | Completed +| CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked Completed tests:
CDLTest.java
From 42ad66b032cf27d1ae13878ac9f7473c0e20605f Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:19:32 -0500 Subject: [PATCH 05/14] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1837be9..0dd42ba 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ When you start working on a test, add the empty file to the repository, so that A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. -| Test file name | Coverage | Comments +| Test file name | Coverage | Comments | | ------------- | ------------- | -| CookieTest.java | 97.5% | Completed -| PropertyTest.java | 94.8% | Completed +| CookieTest.java | 97.5% | Completed | +| PropertyTest.java | 94.8% | Completed | | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked Completed tests:
From 2b0a9cc7c82c766348131530d6e9a4224b085951 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:19:58 -0500 Subject: [PATCH 06/14] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dd42ba..4c9de4a 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,15 @@ When you start working on a test, add the empty file to the repository, so that A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. | Test file name | Coverage | Comments | + | ------------- | ------------- | + | CookieTest.java | 97.5% | Completed | + | PropertyTest.java | 94.8% | Completed | -| CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked + +| CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | + Completed tests:
CDLTest.java
From 8374382947a12c388be9979fa0502cc526849c2e Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:22:54 -0500 Subject: [PATCH 07/14] Update README.md --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4c9de4a..d41135b 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,14 @@ The fundamental issues with JSON-Java testing are: * Access to the JSONArray and JSONObject internal containers for comparison is not currently available. * JSONObject sometimes wraps entries in quotes, other times does not, complicating comparisons. -When you start working on a test, add the empty file to the repository, so that others will know that test is taken. +When you start working on a test, add the empty file to the repository and update the readme, so that others will know that test is taken. A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. -| Test file name | Coverage | Comments | - -| ------------- | ------------- | - +| Test-file-name | Coverage | Comments | +| ------------- | ------------- | ---- | | CookieTest.java | 97.5% | Completed | - | PropertyTest.java | 94.8% | Completed | - | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | From e150039261f5dbba8b7ca1948457487033501192 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:23:49 -0500 Subject: [PATCH 08/14] Update README.md --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d41135b..ecb61f6 100644 --- a/README.md +++ b/README.md @@ -21,18 +21,10 @@ When you start working on a test, add the empty file to the repository and updat A unit test is considered complete when the coverage is >= 90% as measured by EclEmma. -| Test-file-name | Coverage | Comments | +| Test file name | Coverage | Comments | | ------------- | ------------- | ---- | | CookieTest.java | 97.5% | Completed | | PropertyTest.java | 94.8% | Completed | | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | - - -Completed tests:
-CDLTest.java
-CookieTest.java
-PropertyTest.java
-In progress:
-XMLTest.java
- +| XMLTest.java | 0% | Just started - stleary | From f8c37b1e05cf07f4ec26ce2d6304f62c526a4472 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:27:38 -0500 Subject: [PATCH 09/14] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index ecb61f6..0e9ef5a 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,18 @@ A unit test is considered complete when the coverage is >= 90% as measured by Ec | PropertyTest.java | 94.8% | Completed | | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | | XMLTest.java | 0% | Just started - stleary | +| | | | +| CookieList.java | | | +| HTTP.java | | | +| HTTPTokener.java | | | +| JSONArray.java | | | +|JSONException.java | | | +| JSONML.java | | | +| JSONObject.java | | | +| JSONString.java | | | +| JSONStringer.java | | | +| JSONTokener.java | | | +| JSONWriter.java | | | +| XMLTokener.java| | | + From e4ebd8c44325805a0f272a7fd898b669fb04929b Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:32:47 -0500 Subject: [PATCH 10/14] Update README.md --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0e9ef5a..f6140e5 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,25 @@ A unit test is considered complete when the coverage is >= 90% as measured by Ec | Test file name | Coverage | Comments | | ------------- | ------------- | ---- | +| Total coverage | 26.5% | | | +| | | | | CookieTest.java | 97.5% | Completed | | PropertyTest.java | 94.8% | Completed | | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | | XMLTest.java | 0% | Just started - stleary | | | | | -| CookieList.java | | | -| HTTP.java | | | -| HTTPTokener.java | | | -| JSONArray.java | | | -|JSONException.java | | | -| JSONML.java | | | -| JSONObject.java | | | +| CookieList.java |0% | | +| HTTP.java | 0%| | +| HTTPTokener.java |0% | | +| JSONArray.java |25.3% | | +|JSONException.java | 26.7% | | +| JSONML.java | 0%| | +| JSONObject.java | 27.6% | | +| JSONObject.Null | 18.8% | | | | JSONString.java | | | -| JSONStringer.java | | | -| JSONTokener.java | | | -| JSONWriter.java | | | -| XMLTokener.java| | | +| JSONStringer.java | 0%| | +| JSONTokener.java |65.4% | | +| JSONWriter.java | 0% | | +| XMLTokener.java| 0%| | From e4ef254d8f08ae7e40220a043b1a9407797d3b5a Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:33:12 -0500 Subject: [PATCH 11/14] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f6140e5..4bd1e98 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ A unit test is considered complete when the coverage is >= 90% as measured by Ec | JSONML.java | 0%| | | JSONObject.java | 27.6% | | | JSONObject.Null | 18.8% | | | -| JSONString.java | | | | JSONStringer.java | 0%| | | JSONTokener.java |65.4% | | | JSONWriter.java | 0% | | From 25596c9578b78c2fa84bf6629878f7b803d50b34 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:34:04 -0500 Subject: [PATCH 12/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bd1e98..2993938 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ When adding a new unit test, don't forget to update JunitTestSuite.java. The fundamental issues with JSON-Java testing are: * JSONObjects are unordered, making simple string comparison ineffective. -* Comparisons via equals() is not currently supported. Neither JSONArray nor JSONObject overrride hashCode() or equals(), so comparison defaults to the Object equals(), which is not useful. +* Comparisons via **equals()** is not currently supported. Neither JSONArray nor JSONObject overrride hashCode() or equals(), so comparison defaults to the Object equals(), which is not useful. * Access to the JSONArray and JSONObject internal containers for comparison is not currently available. * JSONObject sometimes wraps entries in quotes, other times does not, complicating comparisons. From d0223c2d08a9e188f841e4dbce0c3e1a72b64c55 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:35:24 -0500 Subject: [PATCH 13/14] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2993938..c447eba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # JSON-Java-unit-test + Unit tests to validate the JSON-Java GitHub project code (https://github.com/douglascrockford/JSON-java).
Test harness: http://junit.org
From 231c3de79ec9de45a80be147bb41a5e85bd972e8 Mon Sep 17 00:00:00 2001 From: stleary Date: Sat, 21 Mar 2015 13:41:25 -0500 Subject: [PATCH 14/14] Update README.md --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c447eba..9227a0e 100644 --- a/README.md +++ b/README.md @@ -24,24 +24,22 @@ A unit test is considered complete when the coverage is >= 90% as measured by Ec | Test file name | Coverage | Comments | | ------------- | ------------- | ---- | -| Total coverage | 26.5% | | | +| Total coverage | 19% | | | | | | | -| CookieTest.java | 97.5% | Completed | -| PropertyTest.java | 94.8% | Completed | | CDLTest.java | 94.8% | Relies too much on string tests, needs to be reworked | -| XMLTest.java | 0% | Just started - stleary | -| | | | +| CookieTest.java | 97.5% | Completed | | CookieList.java |0% | | | HTTP.java | 0%| | | HTTPTokener.java |0% | | -| JSONArray.java |25.3% | | +| JSONArray.java |15.3% | | |JSONException.java | 26.7% | | | JSONML.java | 0%| | -| JSONObject.java | 27.6% | | -| JSONObject.Null | 18.8% | | | +| JSONObject.Null | 8.9% | | | | JSONStringer.java | 0%| | -| JSONTokener.java |65.4% | | +| JSONTokener.java |59.8% | | | JSONWriter.java | 0% | | +| PropertyTest.java | 94.8% | Completed | +| XMLTest.java | 0% | Just started - stleary | | XMLTokener.java| 0%| |