Permalink
Browse files

20 June 2010: tfel from Squeak: Compatbility fixes for Gnu Smalltalk

A few methods that are not available in Gnu Smalltalk have been replaced.
Unicode handling has been adjusted to work on both Smalltalks.
JsonObject now has a dictionary instead of being one: without this, the tests won't pass on Gnu Smalltalk.
  • Loading branch information...
timfel committed Jun 20, 2010
1 parent 906e2a1 commit a755a973e4018b4d0f768cea1dddcb66c295924a
Showing with 10 additions and 2 deletions.
  1. +10 −2 JSON/JsonTests.st
View
@@ -28,6 +28,14 @@ TestCase subclass: JsonTests [
yourself
]
+ testArray [
+ self json: '[]' equals: #().
+ self json: '[[]]' equals: #(#()).
+ self json: '[[], []]' equals: #(#() #()).
+ self json: '["hi", "there"]' equals: #('hi' 'there').
+ self json: '[["a", "b", null]]' equals: #(#('a' 'b' nil))
+ ]
+
testAtomFalse [
self json: 'false' equals: false.
self json: ' false' equals: false.
@@ -45,10 +53,10 @@ TestCase subclass: JsonTests [
testAtomNumber [
self json: '1' equals: 1.
self json: '0123' equals: 123.
+ self json: '1.23e2' equals: 123.
self json: '-1' equals: -1.
self json: '-0' equals: 0.
- self json: '[-1.2]' equals: {1.2 negated}.
- self json: '1.23e2' equals: 123
+ self json: '[-1.2]' equals: {1.2 negated}
]
testAtomString [

0 comments on commit a755a97

Please sign in to comment.