Author: etnu
Date: Thu Apr 2 03:33:49 2009
New Revision: 761155
URL: http://svn.apache.org/viewvc?rev=761155&view=rev
Log:
Fixed test. For some reason eclipse isn't recompiling before running.
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java
incubator/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/JsonSerializerTest.java
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java?rev=761155&r1=761154&r2=761155&view=diff
==============================================================================
---
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java
(original)
+++
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/JsonSerializer.java
Thu Apr 2 03:33:49 2009
@@ -387,7 +387,7 @@
buf.append('r');
break;
default:
- // The three possible alternative approaches for dealing with
unicode characters are
+ // The possible alternative approaches for dealing with
unicode characters are
// as follows:
// Method 1 (from json.org.JSONObject)
// 1. Append "000" + Integer.toHexString(current)
Modified:
incubator/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/JsonSerializerTest.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/JsonSerializerTest.java?rev=761155&r1=761154&r2=761155&view=diff
==============================================================================
---
incubator/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/JsonSerializerTest.java
(original)
+++
incubator/shindig/trunk/java/common/src/test/java/org/apache/shindig/common/JsonSerializerTest.java
Thu Apr 2 03:33:49 2009
@@ -181,10 +181,10 @@
StringBuilder builder = new StringBuilder();
JsonSerializer.appendString(builder, "Hello<world>foo < bar");
- assertEquals("Hello\\u003cworld\\u003efoo \\u003c bar",
builder.toString());
+ assertEquals("\"Hello\\u003cworld\\u003efoo \\u003c bar\"",
builder.toString());
// Quick sanity check to make sure that this converts back cleanly.
- JSONObject obj = new JSONObject("{foo:\"" + builder.toString() + "\"}");
+ JSONObject obj = new JSONObject("{foo:" + builder.toString() + "}");
assertEquals("Hello<world>foo < bar", obj.get("foo"));
}