File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/test/java/org/json/junit Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -181,11 +181,10 @@ public void verifyNumberOutput(){
181181
182182 // put handles objects differently than the constructor.
183183 jsonObject = new JSONObject ();
184- jsonObject .put ("myNumber" , new MyNumberContainer ());
184+ jsonObject .put ("myNumber" , new MyNumber ());
185185 actual = jsonObject .toString ();
186- // the output is the toString of the container. i.e org.json.junit.MyNumberContainer@4f063c0a
187- // the hex is the memory address which will change each run.
188- expected = "{\" myNumber\" :\" " +jsonObject .get ("myNumber" )+"\" }" ;
186+ // the output is the toString of the number as a string.
187+ expected = "{\" myNumber\" :\" 42\" }" ;
189188 assertEquals ("Not Equal" , expected , actual );
190189
191190 jsonObject = new JSONObject (Collections .singletonMap ("myNumber" , new AtomicInteger (42 )));
You can’t perform that action at this time.
0 commit comments