Permalink
Browse files

Merge branch 'initialTestSet' into pharo1.3

  • Loading branch information...
2 parents 1234567 + 8d225c9 commit dcae96917a96888c041729acc7282528379d81d8 Dale Henrichs committed Apr 6, 2012
Showing with 335 additions and 92 deletions.
  1. +4 −2 .../Array.extension/instance/{writeCypressJsonOn.indent..st → writeCypressJsonOn.forHtml.indent..st}
  2. +5 −0 .../MonticelloFileTree-Core.package/Boolean.extension/instance/writeCypressJsonOn.forHtml.indent..st
  3. +3 −0 ...itory/MonticelloFileTree-Core.package/Dictionary.extension/instance/writeCypressJsonForHtmlOn..st
  4. +1 −1 repository/MonticelloFileTree-Core.package/Dictionary.extension/instance/writeCypressJsonOn..st
  5. +5 −3 ...ionary.extension/instance/{writeCypressJsonOn.indent..st → writeCypressJsonOn.forHtml.indent..st}
  6. +5 −0 ...y/MonticelloFileTree-Core.package/Number.extension/instance/writeCypressJsonOn.forHtml.indent..st
  7. +0 −3 repository/MonticelloFileTree-Core.package/Number.extension/instance/writeCypressJsonOn.indent..st
  8. +3 −0 ...ry/MonticelloFileTree-Core.package/Object.extension/instance/writeCypressJsonForHtmlOn.indent..st
  9. +5 −0 ...y/MonticelloFileTree-Core.package/Object.extension/instance/writeCypressJsonOn.forHtml.indent..st
  10. +1 −1 ...leTree-Core.package/{Boolean.extension → Object.extension}/instance/writeCypressJsonOn.indent..st
  11. 0 ...ress-Mocks.package → repository/MonticelloFileTree-Core.package}/Object.extension/properties.json
  12. +1 −1 repository/MonticelloFileTree-Core.package/String.extension/instance/cypressEscape.st
  13. +1 −1 repository/MonticelloFileTree-Core.package/String.extension/instance/cypressUnescape.st
  14. +11 −0 ...y/MonticelloFileTree-Core.package/String.extension/instance/writeCypressJsonOn.forHtml.indent..st
  15. +0 −6 repository/MonticelloFileTree-Core.package/String.extension/instance/writeCypressJsonOn.indent..st
  16. +1 −1 repository/MonticelloFileTree-Core.package/monticello.meta/version
  17. +0 −14 tests/packages/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/instance/sampleJson.st
  18. +0 −4 tests/packages/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/compileJSON..st
  19. +0 −7 ...MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testPropertyDictionaryWrite.st
  20. +0 −6 tests/packages/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/tearDown.st
  21. +0 −5 tests/packages/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/testLoad.st
  22. +0 −1 tests/packages/MonticelloFileTree-Tests.package/monticello.meta/version
  23. 0 tests/{packages → repository}/.filetree
  24. 0 tests/{packages/Cypress-Mocks.package → repository/MonticelloFileTree-Tests.package}/.filetree
  25. 0 ...s/{packages → repository}/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/README.md
  26. +19 −10 ...sitory}/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/instance/baseDefinitions.st
  27. 0 ...onticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/instance/basePackageStructureJson.st
  28. +28 −0 ...repository/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/instance/classComment.st
  29. +21 −14 ...tory}/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/instance/targetDefinitions.st
  30. 0 ...kages → repository}/MonticelloFileTree-Tests.package/MCFileTreeAbstractTest.class/properties.json
  31. 0 tests/{packages → repository}/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/README.md
  32. +17 −0 ...pository/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/propertyDictionary.st
  33. +13 −0 ...s/repository/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/sampleHtmlJson.st
  34. +14 −0 tests/repository/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/sampleJson.st
  35. 0 ...ages → repository}/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testJson.st
  36. +11 −0 ...ticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testPropertyDictionaryHtmlRead.st
  37. +7 −0 ...icelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testPropertyDictionaryHtmlWrite.st
  38. +3 −3 .../MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testPropertyDictionaryRead.st
  39. +7 −0 ...MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/instance/testPropertyDictionaryWrite.st
  40. 0 ...{packages → repository}/MonticelloFileTree-Tests.package/MCFileTreeJsonTest.class/properties.json
  41. 0 tests/{packages → repository}/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/README.md
  42. +13 −0 ...ticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/getTestRepositoriesDirectory.st
  43. +5 −0 ...sitory/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/getTestRepository..st
  44. +5 −0 tests/repository/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/hasPackage..st
  45. +8 −0 tests/repository/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/tearDown.st
  46. +4 −0 ...ository/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/tearDownPackages..st
  47. +10 −0 ...s/repository/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/testBaseLoad.st
  48. +10 −0 ...repository/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/testTargetLoad.st
  49. +6 −0 ...tory/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/instance/validateAgainst.for..st
  50. 0 ...ackages → repository}/MonticelloFileTree-Tests.package/MCFileTreeLoaderTest.class/properties.json
  51. 0 tests/{packages → repository}/MonticelloFileTree-Tests.package/monticello.meta/categories.st
  52. 0 ...ress-Mocks.package → repository/MonticelloFileTree-Tests.package}/monticello.meta/initializers.st
  53. 0 tests/{packages → repository}/MonticelloFileTree-Tests.package/monticello.meta/package
  54. +1 −0 tests/repository/MonticelloFileTree-Tests.package/monticello.meta/version
  55. 0 tests/{packages/Cypress-Mocks.package → repository/MonticelloFileTree-Tests.package}/properties.json
  56. +1 −0 tests/testRepositories/ver01/.filetree
  57. 0 ...ckages/MonticelloFileTree-Tests.package → testRepositories/ver01/Cypress-Mocks.package}/.filetree
  58. 0 tests/{packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/README.md
  59. +1 −1 ...packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/class/current..st
  60. +1 −1 ...{packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/class/current.st
  61. +1 −1 ...ckages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/class/initialize.st
  62. +1 −1 ...packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/instance/extra.st
  63. +1 −1 ...ges → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/instance/initialize.st
  64. +1 −1 ...packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/instance/name..st
  65. +1 −1 ...{packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/instance/name.st
  66. +1 −1 .../{packages → testRepositories/ver01}/Cypress-Mocks.package/CypressMockBasic.class/properties.json
  67. +1 −1 ...s → testRepositories/ver01}/Cypress-Mocks.package/Object.extension/instance/isCypressMockBasic.st
  68. +2 −0 tests/testRepositories/ver01/Cypress-Mocks.package/Object.extension/properties.json
  69. 0 tests/{packages → testRepositories/ver01}/Cypress-Mocks.package/monticello.meta/categories.st
  70. 0 ...ree-Tests.package → testRepositories/ver01/Cypress-Mocks.package}/monticello.meta/initializers.st
  71. 0 tests/{packages → testRepositories/ver01}/Cypress-Mocks.package/monticello.meta/package
  72. 0 tests/{packages → testRepositories/ver01}/Cypress-Mocks.package/monticello.meta/version
  73. 0 .../MonticelloFileTree-Tests.package → testRepositories/ver01/Cypress-Mocks.package}/properties.json
  74. +1 −0 tests/testRepositories/ver02/.filetree
  75. +4 −0 tests/testRepositories/ver02/Cypress-Mocks.package/.filetree
  76. +25 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/README.md
  77. +3 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/class/current..st
  78. +3 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/class/current.st
  79. +3 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/class/initialize.st
  80. +3 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/instance/added.st
  81. +4 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/instance/initialize.st
  82. +5 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/instance/name..st
  83. +3 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/instance/name.st
  84. +16 −0 tests/testRepositories/ver02/Cypress-Mocks.package/CypressMockBasic.class/properties.json
  85. +1 −0 tests/testRepositories/ver02/Cypress-Mocks.package/monticello.meta/categories.st
  86. 0 tests/testRepositories/ver02/Cypress-Mocks.package/monticello.meta/initializers.st
  87. +1 −0 tests/testRepositories/ver02/Cypress-Mocks.package/monticello.meta/package
  88. +1 −0 tests/testRepositories/ver02/Cypress-Mocks.package/monticello.meta/version
  89. +2 −0 tests/testRepositories/ver02/Cypress-Mocks.package/properties.json
@@ -1,5 +1,7 @@
*monticellofiletree-core
-writeCypressJsonOn: aStream indent: startIndent
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
| indent |
aStream
nextPutAll: '[';
@@ -9,7 +11,7 @@ writeCypressJsonOn: aStream indent: startIndent
| item |
item := self at: index.
aStream tab: indent.
- item writeCypressJsonOn: aStream indent: indent.
+ item writeCypressJsonOn: aStream forHtml: forHtml indent: indent.
index < self size
ifTrue: [
aStream
@@ -0,0 +1,5 @@
+*monticellofiletree-core
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
+ aStream nextPutAll: self printString
@@ -0,0 +1,3 @@
+*monticellofiletree-core
+writeCypressJsonForHtmlOn: aStream
+ self writeCypressJsonOn: aStream forHtml: true indent: 0
@@ -1,4 +1,4 @@
*monticellofiletree-core
writeCypressJsonOn: aStream
- self writeCypressJsonOn: aStream indent: 0.
+ self writeCypressJsonOn: aStream forHtml: false indent: 0.
aStream lf
@@ -1,5 +1,7 @@
*monticellofiletree-core
-writeCypressJsonOn: aStream indent: startIndent
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
| indent keys |
indent := startIndent.
aStream
@@ -12,9 +14,9 @@ writeCypressJsonOn: aStream indent: startIndent
key := keys at: index.
value := self at: key.
aStream tab: indent.
- key writeCypressJsonOn: aStream indent: indent.
+ key writeCypressJsonOn: aStream forHtml: forHtml indent: indent.
aStream nextPutAll: ' : '.
- value writeCypressJsonOn: aStream indent: indent.
+ value writeCypressJsonOn: aStream forHtml: forHtml indent: indent.
index < self size
ifTrue: [
aStream
@@ -0,0 +1,5 @@
+*monticellofiletree-core
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
+ aStream nextPutAll: self printString
@@ -1,3 +0,0 @@
-*monticellofiletree-core
-writeCypressJsonOn: aStream indent: startIndent
- aStream nextPutAll: self printString
@@ -0,0 +1,3 @@
+*monticellofiletree-core
+writeCypressJsonForHtmlOn: aStream indent: startIndent
+ self writeCypressJsonOn: aStream forHtml: true indent: startIndent
@@ -0,0 +1,5 @@
+*monticellofiletree-core
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
+ ^ self subclassResponsibility
@@ -1,3 +1,3 @@
*monticellofiletree-core
writeCypressJsonOn: aStream indent: startIndent
- aStream nextPutAll: self printString
+ self writeCypressJsonOn: aStream forHtml: false indent: startIndent
@@ -1,3 +1,3 @@
*monticellofiletree-core
cypressEscape
- ^ self
+ ^ self encodeForHTTP
@@ -1,3 +1,3 @@
*monticellofiletree-core
cypressUnescape
- ^ self
+ ^ self unescapePercents
@@ -0,0 +1,11 @@
+*monticellofiletree-core
+writeCypressJsonOn: aStream forHtml: forHtml indent: startIndent
+ "by default ignore <forHtml> ... <forHtml> is used for Dictionary and Array, i.e., container objects and String which actually encodes itself differently for HTML"
+
+ aStream
+ nextPutAll: '"';
+ nextPutAll:
+ (forHtml
+ ifTrue: [ self cypressEscape ]
+ ifFalse: [ self ]);
+ nextPutAll: '"'
@@ -1,6 +0,0 @@
-*monticellofiletree-core
-writeCypressJsonOn: aStream indent: startIndent
- aStream
- nextPutAll: '"';
- nextPutAll: self cypressEscape;
- nextPutAll: '"'

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,14 +0,0 @@
-private
-sampleJson
-
- ^'{
- "name" : "John%20Smith",
- "age" : 25,
- "registered" : true,
- "phoneNumber" : [
- {
- "type" : "home",
- "number" : "212%20555-1234" },
- {
- "type" : "fax",
- "number" : "646%20555-4567" } ] }'
@@ -1,4 +0,0 @@
-private
-compileJSON: aJsonString
-
- ^(Compiler new eval: '(', aJsonString , ')')
@@ -1,7 +0,0 @@
-tests
-testPropertyDictionaryWrite
- | propertyDictionary stream |
- propertyDictionary := MCFileTreeJsonParser parse: self sampleJson.
- stream := WriteStream on: String new.
- propertyDictionary writeCypressJsonOn: stream indent: 0.
- self assert: stream contents = self sampleJson
@@ -1,6 +0,0 @@
-running
-tearDown
- | name |
- super tearDown.
- name := 'Cypress-Mocks'.
- (MCSnapshot definitions: self baseDefinitions) updatePackage: (MCPackage new name: name)
@@ -1,5 +0,0 @@
-testing
-testLoad
- | name |
- name := 'Cypress-Mocks'.
- (MCSnapshot definitions: self targetDefinitions) updatePackage: (MCPackage new name: name)
@@ -1 +0,0 @@
-(name 'MonticelloFileTree-Tests-dkh.1' message 'initial checkin' id '563f5b8d-760f-474b-94ff-40b64d1548bd' date '5 April 2012' time '8:57:38 pm' author 'dkh' ancestors () stepChildren ())
File renamed without changes.
@@ -2,30 +2,33 @@ private
baseDefinitions
| className |
className := 'CypressMockBasic'.
- ^ {(MCClassDefinition
+ ^ {(MCOrganizationDefinition categories: #('Cypress-Mocks')).
+ (MCClassDefinition
name: className
superclassName: 'Object'
category: 'Cypress-Mocks'
instVarNames: #('name')
classVarNames: #()
poolDictionaryNames: #()
classInstVarNames: #('current')
- comment: 'This mock contains basic class and instance method selectors').
+ comment: self classComment).
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'extra'
category: 'accessing'
timeStamp: ''
- source: 'extra
+ source:
+ 'extra
"extra method"').
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'initialize'
category: 'initialization'
timeStamp: ''
- source: 'initialize
+ source:
+ 'initialize
super initialize.
self name: ''Unknown''').
(MCMethodDefinition
@@ -34,45 +37,51 @@ baseDefinitions
selector: 'name'
category: 'accessing'
timeStamp: ''
- source: 'name
+ source:
+ 'name
^name').
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'name:'
category: 'accessing'
timeStamp: ''
- source: 'name: aString
+ source:
+ 'name: aString
name := aString').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'current'
category: 'accessing'
timeStamp: ''
- source: 'current
+ source:
+ 'current
^current').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'current:'
category: 'accessing'
timeStamp: ''
- source: 'current: anObject
+ source:
+ 'current: anObject
current := anObject').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'initialize'
category: 'initialization'
timeStamp: ''
- source: 'initialize
+ source:
+ 'initialize
self current: self new').
(MCMethodDefinition
className: 'Object'
classIsMeta: false
selector: 'isCypressMockBasic'
category: '*Cypress-Mocks'
timeStamp: ''
- source: 'isCypressMockBasic
+ source:
+ 'isCypressMockBasic
^false')}
@@ -0,0 +1,28 @@
+private
+classComment
+ ^ '## Class Comment
+
+This mock contains basic class and instance method selectors.
+
+ [**GitHub Flabored Markdown**][1] with **Smalltalk** sytax *highlighting*:
+
+```Smalltalk
+initialize
+ super initialize.
+ self name: ''Unknown''
+```
+
+And some [UTF8 samples][2]:
+
+```
+ Lithuanian: Aš galiu valgyti stiklą ir jis manęs nežeidžia
+ Russian: Я могу есть стекло, оно мне не вредит.
+ Korean: 나는 유리를 먹을 수 있어요. 그래도 아프지 않아요
+ Hebrew: אני יכול לאכול זכוכית וזה לא מזיק לי.
+ Latin: Vitrum edere possum; mihi non nocet.
+```
+
+
+[1]: http://github.github.com/github-flavored-markdown/
+[2]: http://www.columbia.edu/~fdc/utf8/
+'
@@ -1,33 +1,34 @@
private
targetDefinitions
- "remove #extra method and modify #name: method"
-
| className |
className := 'CypressMockBasic'.
- ^ {(MCClassDefinition
+ ^ {(MCOrganizationDefinition categories: #('Cypress-Mocks')).
+ (MCClassDefinition
name: className
superclassName: 'Object'
category: 'Cypress-Mocks'
instVarNames: #('name')
classVarNames: #()
poolDictionaryNames: #()
classInstVarNames: #('current')
- comment: 'This mock contains basic class and instance method selectors').
+ comment: self classComment).
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'added'
category: 'accessing'
timeStamp: ''
- source: 'added
- "added method"').
+ source:
+ 'added
+ "added method"').
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'initialize'
category: 'initialization'
timeStamp: ''
- source: 'initialize
+ source:
+ 'initialize
super initialize.
self name: ''Unknown''').
(MCMethodDefinition
@@ -36,38 +37,44 @@ targetDefinitions
selector: 'name'
category: 'accessing'
timeStamp: ''
- source: 'name
+ source:
+ 'name
^name').
(MCMethodDefinition
className: className
classIsMeta: false
selector: 'name:'
category: 'accessing'
timeStamp: ''
- source: 'name: aString
- "changed method"
- name := aString').
+ source:
+ 'name: aString
+ "changed method"
+
+ name := aString').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'current'
category: 'accessing'
timeStamp: ''
- source: 'current
+ source:
+ 'current
^current').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'current:'
category: 'accessing'
timeStamp: ''
- source: 'current: anObject
+ source:
+ 'current: anObject
current := anObject').
(MCMethodDefinition
className: className
classIsMeta: true
selector: 'initialize'
category: 'initialization'
timeStamp: ''
- source: 'initialize
+ source:
+ 'initialize
self current: self new')}
Oops, something went wrong.

0 comments on commit dcae969

Please sign in to comment.