Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adjustments for compatibility

  • Loading branch information...
commit 2811f4eead5355866cefe8e4d293120cee5258cf 1 parent 3b5e32c
@timfel timfel authored
Showing with 23 additions and 24 deletions.
  1. +1 −1  JSON/Json.st
  2. +21 −18 JSON/JsonTests.st
  3. +1 −5 package.xml
View
2  JSON/Json.st
@@ -244,7 +244,7 @@ Object subclass: Json [
with: stream next
with: stream next
with: stream next) asUppercase.
- ^Unicode value: (Integer readFrom: string readStream base: 16)
+ ^Character codePoint: (Integer readFrom: string readStream radix: 16)
]
ctorMap [
View
39 JSON/JsonTests.st
@@ -55,14 +55,14 @@ TestCase subclass: JsonTests [
self json: '"\\"' equals: '\'.
self json: '""' equals: ''.
self json: '"a\u0004b"'
- equals: (
- {$a.
- Character value: 4.
- $b} as: String).
- self json: '"a\nb"' equals: (
- {$a.
- Character lf.
- $b} as: String)
+ equals: (String from:
+ {$a.
+ Character value: 4.
+ $b}).
+ self json: '"a\nb"' equals: (String from:
+ {$a.
+ Character lf.
+ $b})
]
testAtomTrue [
@@ -106,8 +106,10 @@ TestCase subclass: JsonTests [
]
testStringWithUnicode [
- self json: '"\u263A"' equals: (Unicode value: 9786) asString.
- self render: (Unicode value: 9786) asString equals: '"\u263A"'
+ self json: '"\u263A"'
+ equals: (Character codePoint: 9786) asUnicodeString asString.
+ self render: (Character codePoint: 9786) asUnicodeString asString
+ equals: '"\u263A"'
]
testWriteAssociation [
@@ -123,14 +125,15 @@ TestCase subclass: JsonTests [
self render: '"' equals: '"\""'.
self render: '\' equals: '"\\"'.
self render: 'hi' equals: '"hi"'.
- self render: (
- {$a.
- Character lf.
- $b} as: String) equals: '"a\nb"'.
- self render: (
- {$a.
- Character value: 4.
- $b} as: String)
+ self render: (String from:
+ {$a.
+ Character lf.
+ $b})
+ equals: '"a\nb"'.
+ self render: (String from:
+ {$a.
+ Character value: 4.
+ $b})
equals: '"a\u0004b"'
]
]
View
6 package.xml
@@ -1,11 +1,9 @@
<package>
<!-- THIS FILE IS GENERATED! EDITS _WILL_ BE LOST ON UPDATE! -->
<name>JSON</name>
-<namespace>JSON</namespace>
<test>
<filein>JSON/JsonTests.st</filein>
-<sunit>JSON.JsonTests
-</sunit>
+<sunit>JsonTests</sunit>
</test>
<filein>Extensions/Association.st</filein>
<filein>Extensions/Collection.st</filein>
@@ -19,7 +17,6 @@
<filein>Extensions/Number.st</filein>
<filein>Extensions/Object.st</filein>
<filein>Extensions/String.st</filein>
-<filein>Extensions/Text.st</filein>
<filein>Extensions/True.st</filein>
<filein>Extensions/UndefinedObject.st</filein>
<filein>Extensions/WriteStream.st</filein>
@@ -36,7 +33,6 @@
<file>Extensions/Number.st</file>
<file>Extensions/Object.st</file>
<file>Extensions/String.st</file>
-<file>Extensions/Text.st</file>
<file>Extensions/True.st</file>
<file>Extensions/UndefinedObject.st</file>
<file>Extensions/WriteStream.st</file>
Please sign in to comment.
Something went wrong with that request. Please try again.