diff --git a/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/instance/Pragma.with.with.with..st b/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/instance/Pragma.with.with.with..st index 005ea4bf..51ac77fe 100644 --- a/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/instance/Pragma.with.with.with..st +++ b/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/instance/Pragma.with.with.with..st @@ -1,9 +1,15 @@ rules Pragma: aNode with: literal with: values with: anotherLiteral - - | exampleName | - (#('exampleNamed:' 'scriptExampleNamed:') anySatisfy: [:prefix | values children first interval contents beginsWith: prefix]) ifTrue: [ + + |pragmaPrefixes exampleName| + pragmaPrefixes := BPExample subclasses collect: [:aSubclass | aSubclass bpExamplePragmaPrefix asString, ':']. + (pragmaPrefixes anySatisfy: [:prefix | values children first interval contents beginsWith: prefix]) ifTrue: [ exampleName := self value: values children first children first. + + self flag: #todo. "As soon as script examples are supported by test serialization, delete condition. jb" + (values children first interval contents beginsWith: BPMethodExample bpExamplePragmaPrefix) + ifTrue: [exampleName := (BPDeserializer deserialize: (Compiler evaluate: exampleName)) exampleName]. + annotations add: (BPExampleAnnotation new exampleName: exampleName; enclosedExpressionSource: aNode interval contents; diff --git a/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/methodProperties.json b/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/methodProperties.json index 7295318b..b80aad88 100644 --- a/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/methodProperties.json +++ b/packages/Babylonian-Compiler.package/BPExtractAnnotations.class/methodProperties.json @@ -13,7 +13,7 @@ "ExecutableCode:variables:with:code:" : "pre 5/29/2019 10:51", "KeywordPragma:with:with:" : "pre 7/23/2019 12:10", "MethodDeclaration:with:and:and:" : "pre 5/29/2019 10:45", - "Pragma:with:with:with:" : "jb 12/7/2020 18:01", + "Pragma:with:with:with:" : "jb 2/2/2021 20:28", "Pragmas:pragmas:" : "jb 12/7/2020 18:01", "defaultExpression:" : "jb 12/7/2020 18:01", "initialize" : "pre 3/24/2020 09:39", diff --git a/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize..st b/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize..st new file mode 100644 index 00000000..ab12493a --- /dev/null +++ b/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize..st @@ -0,0 +1,5 @@ +building +deserialize: aTest + "Deserializes a given Test into a newly generated Example. Consumer is the method which uses the example" + + ^ ((self registeredDeserializers collect: [:d | d from: aTest]) detect: [:d | d canDeserialize]) deserialize \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize.for..st b/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize.for..st deleted file mode 100644 index ffc1c9e8..00000000 --- a/packages/Babylonian-Core.package/BPDeserializer.class/class/deserialize.for..st +++ /dev/null @@ -1,5 +0,0 @@ -building -deserialize: aTest for: anExampleConsumer - "Deserializes a given Test into a newly generated Example. Consumer is the method which uses the example" - - ^ ((self registeredDeserializers collect: [:d | d for: anExampleConsumer from: aTest]) detect: [:d | d canDeserialize]) deserialize \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPDeserializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPDeserializer.class/methodProperties.json index 3835a66d..bd6b8cac 100644 --- a/packages/Babylonian-Core.package/BPDeserializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPDeserializer.class/methodProperties.json @@ -1,6 +1,6 @@ { "class" : { - "deserialize:for:" : "pm 1/9/2021 17:09", + "deserialize:" : "jb 2/1/2021 22:42", "registeredDeserializers" : "jb 1/18/2021 23:23" }, "instance" : { } } diff --git a/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromDeserialized..st b/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromDeserialized..st new file mode 100644 index 00000000..fd723172 --- /dev/null +++ b/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromDeserialized..st @@ -0,0 +1,11 @@ +initialize-release +initializeFromDeserialized: aBPExample + + + self + testRef: aBPExample method; + exampleName: aBPExample exampleName. + + aBPExample setUpScript ifNotNil: [self setUpScript: aBPExample setUpScript]. + aBPExample tearDownScript ifNotNil: [self tearDownScript: aBPExample tearDownScript]. + aBPExample expectedResult ifNotNil: [self expectedResult: aBPExample expectedResult]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromPragma..st b/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromPragma..st index e3548bc8..46589350 100644 --- a/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromPragma..st +++ b/packages/Babylonian-Core.package/BPExample.class/instance/initializeFromPragma..st @@ -1,13 +1,13 @@ initialize-release initializeFromPragma: aPragma - "'exampleNamed:' 'active:'? 'self:'? 'setUp:'? 'tearDown:'? 'expectedResult:'? 'with'*" - self - method: aPragma method; - exampleName: aPragma arguments first. + "'testRef:' 'active:'? 'setUp:'? 'tearDown:'? / 'scriptExampleNamed:' 'active:'? 'setUp:'? 'tearDown:'? 'expectedResult:'? 'script:'? " + | serializingMethod | + serializingMethod := Compiler evaluate: aPragma arguments first. + self initializeFromDeserialized: (BPDeserializer deserialize: serializingMethod); + method: aPragma method. aPragma bpAsDictionary at: #active ifPresent: [:isActive | self isActive: isActive]; at: #setUp ifPresent: [:newScript | self setUpScript: newScript]; - at: #tearDown ifPresent: [:newScript | self tearDownScript: newScript]; - at: #expectedResult ifPresent: [:result | self expectedResult: result]. \ No newline at end of file + at: #tearDown ifPresent: [:newScript | self tearDownScript: newScript]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExample.class/instance/testRef..st b/packages/Babylonian-Core.package/BPExample.class/instance/testRef..st new file mode 100644 index 00000000..1566bd44 --- /dev/null +++ b/packages/Babylonian-Core.package/BPExample.class/instance/testRef..st @@ -0,0 +1,4 @@ +accessing +testRef: aMethodReference + + testRef := aMethodReference \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExample.class/instance/testRef.st b/packages/Babylonian-Core.package/BPExample.class/instance/testRef.st new file mode 100644 index 00000000..6327a084 --- /dev/null +++ b/packages/Babylonian-Core.package/BPExample.class/instance/testRef.st @@ -0,0 +1,4 @@ +accessing +testRef + + ^ testRef ifNil: [self testRef: (BPExampleToTestSerializer serialize: self). testRef] \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExample.class/methodProperties.json b/packages/Babylonian-Core.package/BPExample.class/methodProperties.json index c3c2abd6..058d2d4e 100644 --- a/packages/Babylonian-Core.package/BPExample.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPExample.class/methodProperties.json @@ -12,14 +12,14 @@ "ensureTerminatedProcess" : "jb 12/7/2020 18:10", "exampleName" : "pre 9/30/2020 09:50", "exampleName:" : "jb 12/7/2020 18:10", - "exampleReference" : "pre 9/30/2020 09:53", "execute" : "pre 9/30/2020 09:54", "expectedResult" : "jb 12/7/2020 21:56", "expectedResult:" : "jb 12/7/2020 21:56", "hash" : "pre 9/30/2020 09:54", "initialize" : "pre 1/7/2021 09:33", + "initializeFromDeserialized:" : "jb 2/1/2021 19:58", "initializeFromMethod:" : "jb 12/3/2020 22:37", - "initializeFromPragma:" : "pre 1/21/2021 16:49", + "initializeFromPragma:" : "jb 2/2/2021 23:51", "isActive" : "pre 9/30/2020 09:49", "isActive:" : "pre 10/23/2020 10:16", "liveSpecimen" : "pre 9/30/2020 10:20", @@ -38,6 +38,8 @@ "setUpScript:" : "pre 1/21/2021 15:36", "tearDownScript" : "pre 1/21/2021 15:36", "tearDownScript:" : "pre 1/21/2021 15:36", + "testRef" : "jb 2/1/2021 19:14", + "testRef:" : "jb 2/1/2021 18:54", "toggleIsActive" : "pre 10/23/2020 10:16", "trace" : "pre 9/30/2020 09:55", "traceAsyncNotifying:" : "pre 1/15/2021 13:07", diff --git a/packages/Babylonian-Core.package/BPExample.class/properties.json b/packages/Babylonian-Core.package/BPExample.class/properties.json index 10fcc8c2..261f14be 100644 --- a/packages/Babylonian-Core.package/BPExample.class/properties.json +++ b/packages/Babylonian-Core.package/BPExample.class/properties.json @@ -12,7 +12,8 @@ "traceInformation", "expectedResult", "setUpScript", - "tearDownScript" ], + "tearDownScript", + "testRef" ], "name" : "BPExample", "pools" : [ ], diff --git a/packages/Babylonian-Core.package/BPExampleAnnotation.class/class/newFor.in..st b/packages/Babylonian-Core.package/BPExampleAnnotation.class/class/newFor.in..st index 6c26d060..82018d84 100644 --- a/packages/Babylonian-Core.package/BPExampleAnnotation.class/class/newFor.in..st +++ b/packages/Babylonian-Core.package/BPExampleAnnotation.class/class/newFor.in..st @@ -2,7 +2,6 @@ instance creation newFor: anExample in: aMethodReference "This is intended for new examples which are not yet serialized in any source code" - ^ self new exampleName: anExample exampleName; methodReference: aMethodReference; diff --git a/packages/Babylonian-Core.package/BPExampleAnnotation.class/instance/asMorph.st b/packages/Babylonian-Core.package/BPExampleAnnotation.class/instance/asMorph.st index 582172bf..67a71673 100644 --- a/packages/Babylonian-Core.package/BPExampleAnnotation.class/instance/asMorph.st +++ b/packages/Babylonian-Core.package/BPExampleAnnotation.class/instance/asMorph.st @@ -1,6 +1,6 @@ ui asMorph - + ^ self actualExample morphClass new annotation: self; example: self actualExample; diff --git a/packages/Babylonian-Core.package/BPExampleAnnotation.class/methodProperties.json b/packages/Babylonian-Core.package/BPExampleAnnotation.class/methodProperties.json index a8028904..97f696b6 100644 --- a/packages/Babylonian-Core.package/BPExampleAnnotation.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPExampleAnnotation.class/methodProperties.json @@ -1,10 +1,10 @@ { "class" : { "annotationTag" : "pre 7/24/2019 11:05", - "newFor:in:" : "pre 1/6/2021 17:10" }, + "newFor:in:" : "jb 2/1/2021 20:35" }, "instance" : { "actualExample" : "jb 12/7/2020 18:12", - "asMorph" : "pre 9/30/2020 10:41", + "asMorph" : "jb 2/1/2021 23:40", "canBeAnnotatedTo" : "jb 12/3/2020 22:37", "enclosedExpressionSource" : "pre 7/23/2019 12:18", "exampleName" : "pre 7/23/2019 11:56", diff --git a/packages/Babylonian-Core.package/BPExampleToTest.class/class/serialize..st b/packages/Babylonian-Core.package/BPExampleToTest.class/class/serialize..st index ccfcd4df..23804799 100644 --- a/packages/Babylonian-Core.package/BPExampleToTest.class/class/serialize..st +++ b/packages/Babylonian-Core.package/BPExampleToTest.class/class/serialize..st @@ -1,4 +1,5 @@ instance-creation serialize: anExample - (self forExample: anExample) serialize \ No newline at end of file + "Returns the created method." + ^ (self forExample: anExample) serialize \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/isGeneratedExampleTest.in..st b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/isGeneratedExampleTest.in..st index 425575e8..4c37dff0 100644 --- a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/isGeneratedExampleTest.in..st +++ b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/isGeneratedExampleTest.in..st @@ -1,6 +1,6 @@ helper isGeneratedExampleTest: aMethodName in: aClass - + |methodEntry| methodEntry := self methodEntryFor: aMethodName in: aClass. self assert: [methodEntry notNil]. diff --git a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serialize.st b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serialize.st index 2a33dcd1..8329d161 100644 --- a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serialize.st +++ b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serialize.st @@ -1,6 +1,7 @@ serializing serialize - - | class | + + | class methodName | class := self buildClass. - class compile: (self buildTestForClass: class) classified: (self serializedMethodCategory). \ No newline at end of file + methodName := class compile: (self buildTestForClass: class) classified: (self serializedMethodCategory). + ^ (self methodEntryFor: methodName in: class) asString. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serializedFormOf..st b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serializedFormOf..st index cd649005..c4c410be 100644 --- a/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serializedFormOf..st +++ b/packages/Babylonian-Core.package/BPExampleToTest.class/instance/serializedFormOf..st @@ -3,8 +3,8 @@ serializedFormOf: aPossibleCodeSnippet | result | aPossibleCodeSnippet isSymbol ifTrue: [^ self exampleMethodClassName, ' ' , aPossibleCodeSnippet]. - (self example isLiveSpecimenReference: aPossibleCodeSnippet) ifTrue: [^ '']. result := Compiler evaluate: aPossibleCodeSnippet. + (self example isLiveSpecimenReference: result) ifTrue: [^ (self example resolveLiveSpecimen: result) printString]. ^ result isSymbol ifTrue: [self exampleMethodClassName, ' ' , result] ifFalse: [aPossibleCodeSnippet] \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExampleToTest.class/methodProperties.json b/packages/Babylonian-Core.package/BPExampleToTest.class/methodProperties.json index bd96c537..77628d91 100644 --- a/packages/Babylonian-Core.package/BPExampleToTest.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPExampleToTest.class/methodProperties.json @@ -2,7 +2,7 @@ "class" : { "canSerialize:" : "jb 1/1/2021 22:55", "forExample:" : "pm 12/10/2020 10:07", - "serialize:" : "jb 1/2/2021 01:50" }, + "serialize:" : "jb 2/1/2021 19:13" }, "instance" : { "buildClass" : "jb 12/13/2020 22:48", "buildComment" : "jb 12/13/2020 22:50", @@ -16,13 +16,13 @@ "example:" : "jb 1/1/2021 21:31", "exampleMethodClassName" : "jb 1/1/2021 21:26", "isExisting:in:" : "jb 1/1/2021 22:53", - "isGeneratedExampleTest:in:" : "pm 1/9/2021 17:46", + "isGeneratedExampleTest:in:" : "jb 2/1/2021 19:03", "methodEntryFor:in:" : "jb 1/2/2021 00:18", - "serialize" : "jb 1/1/2021 22:54", + "serialize" : "jb 2/1/2021 19:55", "serializedClassCategory" : "jb 1/2/2021 00:15", "serializedClassName" : "jb 1/2/2021 00:15", "serializedExpectedResult" : "jb 1/1/2021 23:44", - "serializedFormOf:" : "jb 1/1/2021 23:42", + "serializedFormOf:" : "jb 2/2/2021 23:52", "serializedMethodCategory" : "pm 11/30/2020 21:23", "serializedMethodName" : "jb 12/14/2020 00:35", "serializedMethodParameters" : "jb 1/1/2021 21:17", diff --git a/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/class/serialize..st b/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/class/serialize..st index d736efaf..e0fcaacc 100644 --- a/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/class/serialize..st +++ b/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/class/serialize..st @@ -1,4 +1,5 @@ serialize serialize: anExample - (self chooseSerializationClassFor: anExample) serialize: anExample \ No newline at end of file + "Returns the created method." + ^ (self chooseSerializationClassFor: anExample) serialize: anExample \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/methodProperties.json index 151b3536..4b9bd7d9 100644 --- a/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPExampleToTestSerializer.class/methodProperties.json @@ -2,7 +2,7 @@ "class" : { "chooseSerializationClassFor:" : "jb 12/13/2020 23:21", "serializationClasses" : "jb 12/13/2020 23:19", - "serialize:" : "jb 1/1/2021 22:57", + "serialize:" : "jb 2/1/2021 19:13", "serializeActiveExamples" : "jb 1/1/2021 21:01" }, "instance" : { } } diff --git a/packages/Babylonian-Core.package/BPMethodExample.class/class/bpExamplePragmaPrefix.st b/packages/Babylonian-Core.package/BPMethodExample.class/class/bpExamplePragmaPrefix.st index 060a13d4..0fa347df 100644 --- a/packages/Babylonian-Core.package/BPMethodExample.class/class/bpExamplePragmaPrefix.st +++ b/packages/Babylonian-Core.package/BPMethodExample.class/class/bpExamplePragmaPrefix.st @@ -1,4 +1,4 @@ constants bpExamplePragmaPrefix - ^ #exampleNamed \ No newline at end of file + ^ #testRef \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPMethodExample.class/instance/asPragma.st b/packages/Babylonian-Core.package/BPMethodExample.class/instance/asPragma.st index c9f519e2..8ee8554a 100644 --- a/packages/Babylonian-Core.package/BPMethodExample.class/instance/asPragma.st +++ b/packages/Babylonian-Core.package/BPMethodExample.class/instance/asPragma.st @@ -1,12 +1,9 @@ serialization asPragma - "'exampleNamed:' 'active:'? 'setUp:'? 'tearDown:'? 'self:'? 'expectedResult:'? 'with'*" - ^ '' format: { - self exampleName. + "'testRef' 'active:'? 'setUp:'? 'tearDown:'? " + ^ '' format: { + self testRef. self isActive ifFalse: [''] ifTrue: [' active: true']. self setUpScript ifNil: [''] ifNotNil: [:setUpScript | ' setUp: ' , setUpScript printString]. - self tearDownScript ifNil: [''] ifNotNil: [:tearDownScript | ' tearDown: ' , tearDownScript printString]. - self receiverConstructor ifNil: [''] ifNotNil: [:aReceiverConstructor | ' self: ' , aReceiverConstructor printString]. - self expectedResult ifNil: [''] ifNotNil: [:anExpectedResult | ' expectedResult: ' , anExpectedResult printString]. - self argumentScripts ifEmpty: [''] ifNotEmpty: [(self argumentScripts collect: [:anArgumentScript | ' with: ' , anArgumentScript printString]) join]} + self tearDownScript ifNil: [''] ifNotNil: [:tearDownScript | ' tearDown: ' , tearDownScript printString]} diff --git a/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromDeserialized..st b/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromDeserialized..st new file mode 100644 index 00000000..8ee6b2fa --- /dev/null +++ b/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromDeserialized..st @@ -0,0 +1,7 @@ +initialize-release +initializeFromDeserialized: aBPExample + + super initializeFromDeserialized: aBPExample. + + aBPExample receiverConstructor ifNotNil: [ self receiverConstructor: aBPExample receiverConstructor]. + aBPExample argumentScripts ifNotNil: [ self argumentScripts: aBPExample argumentScripts]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromPragma..st b/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromPragma..st deleted file mode 100644 index 49aa4ad3..00000000 --- a/packages/Babylonian-Core.package/BPMethodExample.class/instance/initializeFromPragma..st +++ /dev/null @@ -1,8 +0,0 @@ -initialize-release -initializeFromPragma: aPragma - - super initializeFromPragma: aPragma. - - aPragma bpAsDictionary - at: #self ifPresent: [:receiverConstructor | self receiverConstructor: receiverConstructor]; - at: #with ifPresent: [:argumentScripts | self argumentScripts: argumentScripts]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPMethodExample.class/methodProperties.json b/packages/Babylonian-Core.package/BPMethodExample.class/methodProperties.json index b52847ed..73092849 100644 --- a/packages/Babylonian-Core.package/BPMethodExample.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPMethodExample.class/methodProperties.json @@ -1,18 +1,17 @@ { "class" : { - "bpExamplePragmaPrefix" : "pre 1/21/2021 15:45" }, + "bpExamplePragmaPrefix" : "jb 2/1/2021 19:47" }, "instance" : { "=" : "pre 1/12/2021 15:22", "argumentNames" : "pre 8/25/2020 09:41", "argumentScriptStringAt:" : "pre 7/10/2020 18:23", "argumentScripts" : "pre 7/23/2019 12:20", "argumentScripts:" : "pre 7/23/2019 09:23", - "asPragma" : "jb 1/2/2021 19:22", + "asPragma" : "jb 2/2/2021 14:25", "canBeUsedForDoIts" : "jb 12/3/2020 22:38", - "execute" : "jb 12/3/2020 21:15", "initialize" : "pre 9/30/2020 09:55", + "initializeFromDeserialized:" : "jb 2/1/2021 18:21", "initializeFromMethod:" : "jb 12/3/2020 23:18", - "initializeFromPragma:" : "jb 1/2/2021 21:17", "isLiveSpecimenReference:" : "pre 7/10/2020 18:22", "liveSpecimen" : "pre 1/22/2021 18:52", "morphClass" : "pre 9/30/2020 10:40", diff --git a/packages/Babylonian-Core.package/BPMethodExampleTestDeserializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPMethodExampleTestDeserializer.class/methodProperties.json index ae43aaff..749f474c 100644 --- a/packages/Babylonian-Core.package/BPMethodExampleTestDeserializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPMethodExampleTestDeserializer.class/methodProperties.json @@ -3,4 +3,4 @@ }, "instance" : { "canDeserialize" : "jb 1/18/2021 23:11", - "deserialize" : "jb 1/18/2021 23:58" } } + "deserialize" : "jb 2/1/2021 22:36" } } diff --git a/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/instance/deserialize.st b/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/instance/deserialize.st index 9f445b1a..c58c70b2 100644 --- a/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/instance/deserialize.st +++ b/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/instance/deserialize.st @@ -1,10 +1,10 @@ building deserialize - + | call | call := self findStatementWithMessage: #assert:equals:. - + ^ BPMethodExample new exampleName: self exampleName; method: self test; diff --git a/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/methodProperties.json index 185aa407..3eed9396 100644 --- a/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPMethodTestDeserializer.class/methodProperties.json @@ -3,5 +3,5 @@ }, "instance" : { "canDeserialize" : "pm 1/9/2021 16:10", - "deserialize" : "jb 1/18/2021 23:58", + "deserialize" : "jb 2/1/2021 22:43", "deserializeExpected:" : "pm 1/9/2021 16:57" } } diff --git a/packages/Babylonian-Core.package/BPNegativeMethodTestDeserializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPNegativeMethodTestDeserializer.class/methodProperties.json index dc18ab69..712372d3 100644 --- a/packages/Babylonian-Core.package/BPNegativeMethodTestDeserializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPNegativeMethodTestDeserializer.class/methodProperties.json @@ -3,6 +3,6 @@ }, "instance" : { "canDeserialize" : "pm 1/9/2021 16:10", - "deserialize" : "jb 1/18/2021 23:58", + "deserialize" : "jb 2/1/2021 22:36", "deserializeException:" : "pm 1/9/2021 16:57", "getFirstStatementFrom:" : "pm 1/6/2021 13:14" } } diff --git a/packages/Babylonian-Core.package/BPScriptExample.class/instance/asPragma.st b/packages/Babylonian-Core.package/BPScriptExample.class/instance/asPragma.st index d288740a..15c45d8f 100644 --- a/packages/Babylonian-Core.package/BPScriptExample.class/instance/asPragma.st +++ b/packages/Babylonian-Core.package/BPScriptExample.class/instance/asPragma.st @@ -6,5 +6,5 @@ asPragma self isActive ifFalse: [''] ifTrue: [' active: true']. self setUpScript ifNil: [''] ifNotNil: [:setUpScript | ' setUp: ' , setUpScript printString]. self tearDownScript ifNil: [''] ifNotNil: [:tearDownScript | ' tearDown: ' , tearDownScript printString]. - self expectedResult ifNil: [''] ifNotNil: [:anExpectedResult | ' expectedResult: ' , anExpectedResult printString] - script ifNil: [''] ifNotNil: [' script:' , self scriptString]} + self expectedResult ifNil: [''] ifNotNil: [:anExpectedResult | ' expectedResult: ' , anExpectedResult printString]. + self script ifNil: [''] ifNotNil: [' script: ' , self scriptString]} diff --git a/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromDeserialized..st b/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromDeserialized..st new file mode 100644 index 00000000..3fd1f619 --- /dev/null +++ b/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromDeserialized..st @@ -0,0 +1,6 @@ +initialize-release +initializeFromDeserialized: aBPExample + + super initializeFromDeserialized: aBPExample. + + aBPExample script ifNotNil: [ self script: aBPExample script]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromPragma..st b/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromPragma..st index 1c6055ab..5710bd2e 100644 --- a/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromPragma..st +++ b/packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromPragma..st @@ -1,7 +1,15 @@ initialize-release initializeFromPragma: aPragma - super initializeFromPragma: aPragma. - + self flag: #todo. "Do not overwrite this method as soon as script examples are also serialized as tests. jb" + "'scriptExampleNamed:' 'active:'? 'setUp:'? 'tearDown:'? 'expectedResult:'? 'script:'? " + self + method: aPragma method; + exampleName: aPragma arguments first. + aPragma bpAsDictionary + at: #active ifPresent: [:isActive | self isActive: isActive]; + at: #setUp ifPresent: [:newScript | self setUpScript: newScript]; + at: #tearDown ifPresent: [:newScript | self tearDownScript: newScript]; + at: #expectedResult ifPresent: [:newResult | self expectedResult: newResult]; at: #script ifPresent: [:theScript | self script: theScript]. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPScriptExample.class/methodProperties.json b/packages/Babylonian-Core.package/BPScriptExample.class/methodProperties.json index 144b371c..ea30d6a0 100644 --- a/packages/Babylonian-Core.package/BPScriptExample.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPScriptExample.class/methodProperties.json @@ -1,9 +1,10 @@ { "class" : { - "bpExamplePragmaPrefix" : "pre 1/21/2021 15:45" }, + "bpExamplePragmaPrefix" : "jb 2/2/2021 19:58" }, "instance" : { - "asPragma" : "pre 1/21/2021 16:19", - "initializeFromPragma:" : "pre 1/21/2021 16:06", + "asPragma" : "jb 2/2/2021 20:05", + "initializeFromDeserialized:" : "jb 2/1/2021 18:22", + "initializeFromPragma:" : "jb 2/2/2021 13:49", "morphClass" : "pre 9/30/2020 10:41", "run" : "pre 1/21/2021 17:18", "script" : "pre 9/30/2020 11:00", diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/class/for.from..st b/packages/Babylonian-Core.package/BPTestDeserializer.class/class/for.from..st deleted file mode 100644 index 42bfe8fd..00000000 --- a/packages/Babylonian-Core.package/BPTestDeserializer.class/class/for.from..st +++ /dev/null @@ -1,7 +0,0 @@ -instance creation -for: anExampleConsumer from: aTestMethod - - ^ self basicNew - test: aTestMethod; - consumer: anExampleConsumer; - initialize \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/class/from..st b/packages/Babylonian-Core.package/BPTestDeserializer.class/class/from..st new file mode 100644 index 00000000..d85991b4 --- /dev/null +++ b/packages/Babylonian-Core.package/BPTestDeserializer.class/class/from..st @@ -0,0 +1,6 @@ +instance creation +from: aTestMethod + + ^ self basicNew + test: aTestMethod; + initialize \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer..st b/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer..st deleted file mode 100644 index f7d03ad4..00000000 --- a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -consumer: aConsumer - - consumer := aConsumer. \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer.st b/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer.st deleted file mode 100644 index f205158e..00000000 --- a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/consumer.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -consumer - - ^ consumer \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/formatWithoutParentheses..st b/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/formatWithoutParentheses..st index 30fc2a3b..bac5ff60 100644 --- a/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/formatWithoutParentheses..st +++ b/packages/Babylonian-Core.package/BPTestDeserializer.class/instance/formatWithoutParentheses..st @@ -1,7 +1,8 @@ accessing formatWithoutParentheses: aNode - - | code | + + | code hasParentheses| code := aNode formattedCode. - ^ aNode hasParentheses ifTrue: [code copyFrom: 2 to: code size - 1] ifFalse: [code] \ No newline at end of file + hasParentheses := (code beginsWith: '(') and: [code endsWith: ')']. + ^ hasParentheses ifTrue: [code copyFrom: 2 to: code size - 1] ifFalse: [code] \ No newline at end of file diff --git a/packages/Babylonian-Core.package/BPTestDeserializer.class/methodProperties.json b/packages/Babylonian-Core.package/BPTestDeserializer.class/methodProperties.json index b198616e..3f62e53c 100644 --- a/packages/Babylonian-Core.package/BPTestDeserializer.class/methodProperties.json +++ b/packages/Babylonian-Core.package/BPTestDeserializer.class/methodProperties.json @@ -1,18 +1,16 @@ { "class" : { - "for:from:" : "jb 1/18/2021 23:42" }, + "from:" : "jb 2/1/2021 22:41" }, "instance" : { "ast" : "pm 1/6/2021 12:08", "ast:" : "pm 1/6/2021 12:08", "canDeserialize" : "jb 1/18/2021 23:11", - "consumer" : "pm 1/6/2021 12:08", - "consumer:" : "pm 1/6/2021 12:08", "deserialize" : "jb 1/18/2021 23:39", "deserializeArguments:" : "pm 1/25/2021 22:33", "deserializeReceiver:" : "pm 1/25/2021 23:26", "exampleName" : "jb 1/18/2021 23:50", "findStatementWithMessage:" : "pm 1/6/2021 13:08", - "formatWithoutParentheses:" : "pm 1/25/2021 23:06", + "formatWithoutParentheses:" : "jb 2/1/2021 20:09", "initialize" : "jb 1/18/2021 23:32", "nodeToValue:" : "pm 1/25/2021 23:26", "test" : "pm 1/6/2021 12:08", diff --git a/packages/Babylonian-Core.package/CompiledMethod.extension/methodProperties.json b/packages/Babylonian-Core.package/CompiledMethod.extension/methodProperties.json index a571629e..cb86cf63 100644 --- a/packages/Babylonian-Core.package/CompiledMethod.extension/methodProperties.json +++ b/packages/Babylonian-Core.package/CompiledMethod.extension/methodProperties.json @@ -3,9 +3,9 @@ }, "instance" : { "bpActiveExamples" : "pre 8/20/2020 15:51", - "bpExamples" : "pre 1/21/2021 15:47", - "bpNewExampleFrom:" : "pre 1/6/2021 19:04", - "bpRecompile" : "pre 1/4/2021 17:24", + "bpExamples" : "jb 2/1/2021 19:49", + "bpNewExampleFrom:" : "jb 2/1/2021 21:59", + "bpRecompile" : "jb 2/1/2021 21:59", "bpRemoveExample:" : "pre 1/6/2021 18:58", "bpSourceMap" : "pre 7/2/2020 19:22", "compiledMethod" : "pre 7/7/2020 15:39", diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/instance/testRenderingExample.st b/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/instance/testRenderingExample.st index a8bb6fa7..6abac09a 100644 --- a/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/instance/testRenderingExample.st +++ b/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/instance/testRenderingExample.st @@ -24,6 +24,6 @@ testRenderingExample renderedSource := source asBPSource. self assert: 'method - +>#testExample1''> ^ 2 + 3' equals: renderedSource \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/methodProperties.json index 548b1c39..1c916318 100644 --- a/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPAnnotationMorphsTest.class/methodProperties.json @@ -6,7 +6,7 @@ "methodWithBlock" : "jb 12/3/2020 22:59", "methodWithBlockAndProbe" : "jb 12/7/2020 19:05", "setUp" : "pre 7/25/2019 12:06", - "testRenderingExample" : "pre 1/21/2021 16:19", + "testRenderingExample" : "jb 2/2/2021 13:59", "testRenderingExampleSpecificReplacement" : "jb 12/3/2020 22:59", "testRenderingNestedProbes" : "jb 12/3/2020 22:59", "testRenderingNestedProbesWithDifferentLengths" : "jb 12/3/2020 22:59", diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/README.md b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/instance/testExample1.st b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/instance/testExample1.st new file mode 100644 index 00000000..e3c279e3 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/instance/testExample1.st @@ -0,0 +1,5 @@ +tests +testExample1 + "Generated from an example, do not modify" + + self assert: (5) equals: ((BPAnnotationMorphsTest tester) method) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/methodProperties.json new file mode 100644 index 00000000..9e294942 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "testExample1" : "jb 2/2/2021 13:59" } } diff --git a/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/properties.json b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/properties.json new file mode 100644 index 00000000..b0ad612c --- /dev/null +++ b/packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Babylonian-Tests-Test", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BPAnnotationMorphsTestTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testBasicTestDeserializer.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testBasicTestDeserializer.st index 9890d31a..b2c64cc6 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testBasicTestDeserializer.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testBasicTestDeserializer.st @@ -3,8 +3,6 @@ testBasicTestDeserializer | result | - result := (BPMethodExampleTestDeserializer - for: (BPGeneratedTest>>#add:to:) - from: (BPGeneratedTest>>#testBasicTestExample)) deserialize. + result := (BPMethodExampleTestDeserializer from: (BPGeneratedTest>>#testBasicTestExample)) deserialize. self assert: 'BPGeneratedTest for: 10' equals: result receiverConstructor. self assert: (#('2' '3')) equals: result argumentScripts. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithBasicTest.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithBasicTest.st index 9d8ef46c..3e1c4a0f 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithBasicTest.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithBasicTest.st @@ -2,5 +2,5 @@ tests testDeserializerDirectorWithBasicTest self assert: nil equals: ( - (BPDeserializer deserialize: BPGeneratedTest>>#testBasicTestExample for: BPGeneratedTest>>#add:to:) + (BPDeserializer deserialize: BPGeneratedTest>>#testBasicTestExample) expectedResult). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithMethodTest.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithMethodTest.st index b5b72feb..226f75ae 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithMethodTest.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithMethodTest.st @@ -2,5 +2,5 @@ tests testDeserializerDirectorWithMethodTest self assert: '15' equals: ( - (BPDeserializer deserialize: BPGeneratedTest>>#testMethodTestExample for: BPGeneratedTest>>#add:to:) + (BPDeserializer deserialize: BPGeneratedTest>>#testMethodTestExample) expectedResult). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithNegativeMethodTest.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithNegativeMethodTest.st index 1519a19b..e4d5cd91 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithNegativeMethodTest.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testDeserializerDirectorWithNegativeMethodTest.st @@ -2,5 +2,5 @@ tests testDeserializerDirectorWithNegativeMethodTest self assert: 'Error' equals: ( - (BPDeserializer deserialize: BPGeneratedTest>>#testNegativeMethodTestExample for: BPGeneratedTest>>#add:to:) + (BPDeserializer deserialize: BPGeneratedTest>>#testNegativeMethodTestExample) expectedResult). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultArray.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultArray.st index 1a67c460..094bc80e 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultArray.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultArray.st @@ -4,7 +4,6 @@ testMethodTestDeserializerReturnsExpectedResultArray | result | result := (BPMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testMethodTestExpectedArray)) deserialize. self assert: '#(2 ''323'')' equals: result expectedResult. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultNumber.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultNumber.st index 0dd02dd0..3e3bed9c 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultNumber.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultNumber.st @@ -4,7 +4,6 @@ testMethodTestDeserializerReturnsExpectedResultNumber | result | result := (BPMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testMethodTestExample)) deserialize. self assert: '15' equals: result expectedResult. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultString.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultString.st index ce923afb..2d995f20 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultString.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testMethodTestDeserializerReturnsExpectedResultString.st @@ -4,7 +4,6 @@ testMethodTestDeserializerReturnsExpectedResultString | result | result := (BPMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testMethodTestExpectedString)) deserialize. self assert: '''Hello''' equals: result expectedResult. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsErrorType.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsErrorType.st index fd300ef0..cac44f2b 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsErrorType.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsErrorType.st @@ -4,7 +4,6 @@ testNegativeMethodTestDeserializerReturnsErrorType | result | result := (BPNegativeMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testNegativeMethodTestExample)) deserialize. self assert: 'Error' equals: result expectedResult. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsParameters.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsParameters.st index 58156d85..93ed6409 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsParameters.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsParameters.st @@ -4,7 +4,6 @@ testNegativeMethodTestDeserializerReturnsParameters | result | result := (BPNegativeMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testNegativeMethodTestExample)) deserialize. self assert: (#('-1' '3')) equals: result argumentScripts. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsReceiver.st b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsReceiver.st index 3fba8935..b4901715 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsReceiver.st +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/instance/testNegativeMethodTestDeserializerReturnsReceiver.st @@ -4,7 +4,6 @@ testNegativeMethodTestDeserializerReturnsReceiver | result | result := (BPNegativeMethodTestDeserializer - for: (BPGeneratedTest>>#add:to:) from: (BPGeneratedTest>>#testNegativeMethodTestExample)) deserialize. self assert: 'BPGeneratedTest for: 10' equals: result receiverConstructor. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPDeserializerTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPDeserializerTest.class/methodProperties.json index bbfc382b..41617fab 100644 --- a/packages/Babylonian-Tests.package/BPDeserializerTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPDeserializerTest.class/methodProperties.json @@ -2,13 +2,13 @@ "class" : { }, "instance" : { - "testBasicTestDeserializer" : "pm 1/25/2021 23:09", - "testDeserializerDirectorWithBasicTest" : "pm 1/9/2021 16:26", - "testDeserializerDirectorWithMethodTest" : "pm 1/25/2021 23:09", - "testDeserializerDirectorWithNegativeMethodTest" : "pm 1/25/2021 23:09", - "testMethodTestDeserializerReturnsExpectedResultArray" : "pm 1/25/2021 23:11", - "testMethodTestDeserializerReturnsExpectedResultNumber" : "pm 1/25/2021 23:07", - "testMethodTestDeserializerReturnsExpectedResultString" : "pm 1/25/2021 23:10", - "testNegativeMethodTestDeserializerReturnsErrorType" : "pm 1/25/2021 23:07", - "testNegativeMethodTestDeserializerReturnsParameters" : "pm 1/25/2021 23:07", - "testNegativeMethodTestDeserializerReturnsReceiver" : "pm 1/25/2021 23:09" } } + "testBasicTestDeserializer" : "jb 2/1/2021 22:41", + "testDeserializerDirectorWithBasicTest" : "jb 2/1/2021 22:42", + "testDeserializerDirectorWithMethodTest" : "jb 2/1/2021 22:42", + "testDeserializerDirectorWithNegativeMethodTest" : "jb 2/1/2021 22:42", + "testMethodTestDeserializerReturnsExpectedResultArray" : "jb 2/1/2021 22:42", + "testMethodTestDeserializerReturnsExpectedResultNumber" : "jb 2/1/2021 22:42", + "testMethodTestDeserializerReturnsExpectedResultString" : "jb 2/1/2021 22:43", + "testNegativeMethodTestDeserializerReturnsErrorType" : "jb 2/1/2021 22:43", + "testNegativeMethodTestDeserializerReturnsParameters" : "jb 2/1/2021 22:43", + "testNegativeMethodTestDeserializerReturnsReceiver" : "jb 2/1/2021 22:43" } } diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlag.class/instance/initialize.st b/packages/Babylonian-Tests.package/BPEuropeanFlag.class/instance/initialize.st index 1e1c6160..ffc2aa4d 100644 --- a/packages/Babylonian-Tests.package/BPEuropeanFlag.class/instance/initialize.st +++ b/packages/Babylonian-Tests.package/BPEuropeanFlag.class/instance/initialize.st @@ -1,6 +1,6 @@ initialization initialize - + >#testOneExample'> | newStar | super initialize. diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlag.class/methodProperties.json b/packages/Babylonian-Tests.package/BPEuropeanFlag.class/methodProperties.json index 1156305a..99b2e98b 100644 --- a/packages/Babylonian-Tests.package/BPEuropeanFlag.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPEuropeanFlag.class/methodProperties.json @@ -4,4 +4,4 @@ "instance" : { "foobar" : "pre 10/29/2020 11:41", "foobar10" : "pre 10/16/2020 11:28", - "initialize" : "pre 10/13/2020 15:08" } } + "initialize" : "jb 2/2/2021 13:56" } } diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/README.md b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/instance/testOneExample.st b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/instance/testOneExample.st new file mode 100644 index 00000000..0f5d88a2 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/instance/testOneExample.st @@ -0,0 +1,5 @@ +tests +testOneExample + "Generated from an example, do not modify" + + (BPEuropeanFlag new) initialize \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/methodProperties.json new file mode 100644 index 00000000..d65bd1d5 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "testOneExample" : "jb 2/2/2021 13:56" } } diff --git a/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/properties.json b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/properties.json new file mode 100644 index 00000000..857b5d08 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPEuropeanFlagTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Babylonian-Tests-Fixtures-Test", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BPEuropeanFlagTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/Babylonian-Tests.package/BPExampleTest.class/instance/testExamplesKnowTheirTestRef.st b/packages/Babylonian-Tests.package/BPExampleTest.class/instance/testExamplesKnowTheirTestRef.st new file mode 100644 index 00000000..d9bbe0ec --- /dev/null +++ b/packages/Babylonian-Tests.package/BPExampleTest.class/instance/testExamplesKnowTheirTestRef.st @@ -0,0 +1,4 @@ +tests +testExamplesKnowTheirTestRef + + self assert: 'BPTestExamplesClassTest>>#testBasic' equals: method bpExamples first testRef asString. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPExampleTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPExampleTest.class/methodProperties.json index 26628a60..e7f695d8 100644 --- a/packages/Babylonian-Tests.package/BPExampleTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPExampleTest.class/methodProperties.json @@ -22,6 +22,7 @@ "testExamplesKnowTheirOriginalMethod" : "jb 12/7/2020 19:08", "testExamplesKnowTheirSetUp" : "pre 1/21/2021 16:49", "testExamplesKnowTheirTearDown" : "pre 1/21/2021 16:46", + "testExamplesKnowTheirTestRef" : "jb 2/2/2021 14:46", "testGetExamplesForAMethod" : "jb 12/7/2020 19:08", "testGetScriptExamplesForAMethod" : "jb 12/7/2020 19:08", "testLiveSpecimanExample" : "pre 9/30/2020 09:37", diff --git a/packages/Babylonian-Tests.package/BPSearchCollection.class/instance/binarySearch..st b/packages/Babylonian-Tests.package/BPSearchCollection.class/instance/binarySearch..st index e4e1f1bb..7799e1e8 100644 --- a/packages/Babylonian-Tests.package/BPSearchCollection.class/instance/binarySearch..st +++ b/packages/Babylonian-Tests.package/BPSearchCollection.class/instance/binarySearch..st @@ -1,16 +1,16 @@ searching binarySearch: anElement - - - + >#testBasic'> + >#testNotFound'> + >#testLargeExample'> | index low high | - low := 1. + low := 1. high := self size. [high < low] whileFalseDo: [ - index := ">#binarySearch:>>#''large example''' that: [:result | result between: 4000 and: 5000]>"high + low // 2"". + index := high + low // 2. - (anElement < (self at: ""index"")) + (anElement < (self at:index)) ifTrue: [ high := index - 1 ] ifFalse: [ anElement > (self at: index) diff --git a/packages/Babylonian-Tests.package/BPSearchCollection.class/methodProperties.json b/packages/Babylonian-Tests.package/BPSearchCollection.class/methodProperties.json index a70579d7..1819c25f 100644 --- a/packages/Babylonian-Tests.package/BPSearchCollection.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPSearchCollection.class/methodProperties.json @@ -4,4 +4,4 @@ "numbersUpTo10" : "pre 11/9/2019 15:06", "numbersUpTo10000" : "pre 10/22/2020 13:54" }, "instance" : { - "binarySearch:" : "jb 1/2/2021 20:38" } } + "binarySearch:" : "jb 2/2/2021 13:18" } } diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/README.md b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testBasic.st b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testBasic.st new file mode 100644 index 00000000..20d05f8a --- /dev/null +++ b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testBasic.st @@ -0,0 +1,5 @@ +tests +testBasic + "Generated from an example, do not modify" + + self assert: (15) equals: ((BPSearchCollection newFrom: (1 to: 15)) binarySearch: 15) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testLargeExample.st b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testLargeExample.st new file mode 100644 index 00000000..316d48e1 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testLargeExample.st @@ -0,0 +1,5 @@ +tests +testLargeExample + "Generated from an example, do not modify" + + self assert: (4532) equals: ((BPSearchCollection numbersUpTo10000) binarySearch: 4532) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testNotFound.st b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testNotFound.st new file mode 100644 index 00000000..d7f65120 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/instance/testNotFound.st @@ -0,0 +1,5 @@ +tests +testNotFound + "Generated from an example, do not modify" + + self assert: (BPSearchCollection newFrom: (1 to: 10)) equals: ((BPSearchCollection numbersUpTo10) binarySearch: 20) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/methodProperties.json new file mode 100644 index 00000000..97daf0af --- /dev/null +++ b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/methodProperties.json @@ -0,0 +1,7 @@ +{ + "class" : { + }, + "instance" : { + "testBasic" : "jb 2/2/2021 13:17", + "testLargeExample" : "jb 2/1/2021 20:16", + "testNotFound" : "jb 2/1/2021 18:07" } } diff --git a/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/properties.json b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/properties.json new file mode 100644 index 00000000..35f3aee8 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPSearchCollectionTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Babylonian-Tests-Fixtures-Test", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BPSearchCollectionTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertExample.equals..st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertExample.equals..st index 14d00bd3..57611ce9 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertExample.equals..st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertExample.equals..st @@ -1,4 +1,4 @@ -as yet unclassified +helper assertExample: anExample1 equals: anExample2 self assert: anExample1 exampleName equals: anExample2 exampleName. diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertRoundtripFromMethod.At.ToTest..st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertRoundtripFromMethod.At.ToTest..st index 76ed29bc..90b140c5 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertRoundtripFromMethod.At.ToTest..st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertRoundtripFromMethod.At.ToTest..st @@ -1,9 +1,9 @@ -as yet unclassified +helper assertRoundtripFromMethod: anExampleMethod At: anIndex ToTest: aTestMethodBlock | original result | original := anExampleMethod bpExamples at: anIndex. BPExampleToTestSerializer serialize: original. - result := BPDeserializer deserialize: aTestMethodBlock value for: anExampleMethod. + result := BPDeserializer deserialize: aTestMethodBlock value. self assertExample: original equals: result. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/removeAllMethodsFromClass..st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/removeAllMethodsFromClass..st index ecb058a1..e200ddae 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/removeAllMethodsFromClass..st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/removeAllMethodsFromClass..st @@ -1,4 +1,4 @@ -as yet unclassified +helper removeAllMethodsFromClass: aClass aClass methodDict removeAll. diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/tearDown.st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/tearDown.st index 58988188..38737197 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/tearDown.st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/tearDown.st @@ -1,4 +1,4 @@ -as yet unclassified +running tearDown self removeAllMethodsFromClass: self class testClass. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodExampleRoundTrip.st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodExampleRoundTrip.st index db833f0e..3eb0fbd3 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodExampleRoundTrip.st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodExampleRoundTrip.st @@ -1,4 +1,4 @@ -as yet unclassified +tests testMethodExampleRoundTrip self assertRoundtripFromMethod: self class exampleMethod At: 3 ToTest: [BPGeneratedTestTest>>#testBasic]. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodTestRoundTrip.st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodTestRoundTrip.st index b19c5ce9..c0598517 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodTestRoundTrip.st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testMethodTestRoundTrip.st @@ -1,4 +1,4 @@ -as yet unclassified +tests testMethodTestRoundTrip self assertRoundtripFromMethod: self class exampleMethod At: 1 ToTest: [BPGeneratedTestTest>>#testFoo]. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testNegativeMethodExampleRoundTrip.st b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testNegativeMethodExampleRoundTrip.st index 04e9315f..84e89d31 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testNegativeMethodExampleRoundTrip.st +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/testNegativeMethodExampleRoundTrip.st @@ -1,4 +1,4 @@ -as yet unclassified +tests testNegativeMethodExampleRoundTrip self assertRoundtripFromMethod: self class exampleMethod At: 2 ToTest: [BPGeneratedTestTest>>#testBar]. \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/methodProperties.json index ca117646..04a5819b 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/methodProperties.json @@ -4,7 +4,7 @@ "testClass" : "pm 1/25/2021 11:41" }, "instance" : { "assertExample:equals:" : "pm 1/25/2021 11:52", - "assertRoundtripFromMethod:At:ToTest:" : "pm 1/25/2021 12:12", + "assertRoundtripFromMethod:At:ToTest:" : "jb 2/2/2021 14:01", "removeAllMethodsFromClass:" : "pm 1/25/2021 12:04", "tearDown" : "pm 1/25/2021 22:25", "testMethodExampleRoundTrip" : "pm 1/25/2021 12:12", diff --git a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/properties.json b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/properties.json index 8bec7fc8..82b62fe7 100644 --- a/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/properties.json +++ b/packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/properties.json @@ -1,5 +1,5 @@ { - "category" : "Babylonian-Tests", + "category" : "Babylonian-Tests-Core-Serializing", "classinstvars" : [ ], "classvars" : [ diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st index c6d3058c..21a9edb6 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st @@ -1,4 +1,5 @@ fixtures method - + + >#testExample1'> ""2 + 3"" \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerCanCopeWithProbeWithinSliderRange.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerCanCopeWithProbeWithinSliderRange.st index 9b92316f..dc063ecd 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerCanCopeWithProbeWithinSliderRange.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerCanCopeWithProbeWithinSliderRange.st @@ -3,7 +3,7 @@ testStylerCanCopeWithProbeWithinSliderRange | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - + >#testExample1''> self do: ""[:n | 2 + ""3""]""' asText. formattedSourceCode := styler format: originalSourceCode. diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForAssertion.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForAssertion.st index b1fd2821..7aea9d43 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForAssertion.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForAssertion.st @@ -3,7 +3,7 @@ testStylerSetsAnchorForAssertion | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - + >#testExample1''> ""2 + 3""' asText. formattedSourceCode := styler format: originalSourceCode. diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForExample.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForExample.st index 41b0042a..44124109 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForExample.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForExample.st @@ -1,14 +1,14 @@ tests testStylerSetsAnchorForExample - + | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - + >#testExample1''> ""2 + 3""' asText. formattedSourceCode := styler format: originalSourceCode. - self deny: (formattedSourceCode asString includesSubstring: ''). + self deny: (formattedSourceCode asString includesSubstring: '>#method''>'). attributes := formattedSourceCode attributesAt: (formattedSourceCode asString indexOf: Character startOfHeader). attributes := attributes select: [:a | a isKindOf: TextAnchor]. - self assert: (attributes first anchoredMorph isKindOf: BPExamplesMorph). + self assert: (attributes first anchoredMorph isKindOf: BPExamplesMorph). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForReplacement.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForReplacement.st index 87e6fae9..f385d209 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForReplacement.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForReplacement.st @@ -1,9 +1,9 @@ tests testStylerSetsAnchorForReplacement - + | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - +>#testExample1''> ""2 + 3""' asText. formattedSourceCode := styler format: originalSourceCode. @@ -13,4 +13,4 @@ testStylerSetsAnchorForReplacement attributes := formattedSourceCode attributesAt: (formattedSourceCode asString lastIndexOf: Character startOfHeader). attributes := attributes select: [:a | a isKindOf: TextAnchor]. - self assert: (attributes first anchoredMorph isKindOf: BPReplacementMorph). + self assert: (attributes first anchoredMorph isKindOf: BPReplacementMorph). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForScriptExample.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForScriptExample.st index 33b00671..280f847a 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForScriptExample.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForScriptExample.st @@ -1,9 +1,9 @@ tests testStylerSetsAnchorForScriptExample - + | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - + ""2 + 3""' asText. formattedSourceCode := styler format: originalSourceCode. @@ -11,4 +11,4 @@ testStylerSetsAnchorForScriptExample attributes := formattedSourceCode attributesAt: (formattedSourceCode asString indexOf: Character startOfHeader). attributes := attributes select: [:a | a isKindOf: TextAnchor]. - self assert: (attributes first anchoredMorph isKindOf: BPExamplesMorph). + self assert: (attributes first anchoredMorph isKindOf: BPExamplesMorph). \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForSlider.st b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForSlider.st index 368c8a65..f6d677ab 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForSlider.st +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/instance/testStylerSetsAnchorForSlider.st @@ -3,7 +3,7 @@ testStylerSetsAnchorForSlider | formattedSourceCode originalSourceCode attributes | originalSourceCode := 'method - + >#testExample1''> ""2 + 3""' asText. formattedSourceCode := styler format: originalSourceCode. diff --git a/packages/Babylonian-Tests.package/BPStylerTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPStylerTest.class/methodProperties.json index 8986f51d..d803e5d2 100644 --- a/packages/Babylonian-Tests.package/BPStylerTest.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPStylerTest.class/methodProperties.json @@ -2,18 +2,18 @@ "class" : { }, "instance" : { - "method" : "pre 7/23/2019 12:04", + "method" : "jb 2/2/2021 20:31", "runCase" : "pre 12/16/2020 19:16", "setUp" : "jb 12/7/2020 19:10", - "testStylerCanCopeWithProbeWithinSliderRange" : "jb 12/7/2020 19:10", + "testStylerCanCopeWithProbeWithinSliderRange" : "jb 2/2/2021 19:55", "testStylerSetsAnchorAttributeForNestedProbes" : "jb 12/7/2020 19:10", "testStylerSetsAnchorAttributeForProbe" : "jb 12/7/2020 19:10", "testStylerSetsAnchorAttributeForProbeOnOperand" : "jb 12/7/2020 19:10", "testStylerSetsAnchorAttributeForProbeOnUnaryMessageChain" : "jb 12/7/2020 19:10", "testStylerSetsAnchorCharacterForProbe" : "jb 12/7/2020 19:10", - "testStylerSetsAnchorForAssertion" : "jb 12/7/2020 19:10", + "testStylerSetsAnchorForAssertion" : "jb 2/2/2021 19:53", "testStylerSetsAnchorForAssignmentProbe" : "jb 12/7/2020 19:10", - "testStylerSetsAnchorForExample" : "jb 12/7/2020 19:10", - "testStylerSetsAnchorForReplacement" : "jb 12/7/2020 19:10", - "testStylerSetsAnchorForScriptExample" : "jb 12/7/2020 19:10", - "testStylerSetsAnchorForSlider" : "jb 12/7/2020 19:10" } } + "testStylerSetsAnchorForExample" : "jb 2/2/2021 20:31", + "testStylerSetsAnchorForReplacement" : "jb 2/2/2021 20:31", + "testStylerSetsAnchorForScriptExample" : "jb 2/2/2021 20:31", + "testStylerSetsAnchorForSlider" : "jb 2/2/2021 19:54" } } diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/addAndLog..st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/addAndLog..st index 579139c0..fdf40aee 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/addAndLog..st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/addAndLog..st @@ -1,8 +1,8 @@ private addAndLog: aNumber - - - -| result | 1 to: 100 do: [ :i | result := (self bpTrace: [self + aNumber] forProbe: 3232 inContext: thisContext) ]. -"Transcript showln: result." - ^ result \ No newline at end of file + >#testSmallNumber'> +>#testLargeNumber'> + | result | + 1 to: 100 do: [ :i | result := self + aNumber]. + "Transcript showln: result." + ^ result \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/binarySearchIn.theElement..st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/binarySearchIn.theElement..st index 192529e6..9a07ccbb 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/binarySearchIn.theElement..st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/binarySearchIn.theElement..st @@ -1,10 +1,10 @@ example methods binarySearchIn: aCollection theElement: anElement - - - - + >#testBasic'> + >#testSmallExample'> + >#testErrorExample'> + >#testComplexExample' setUp: '#basicSetUpScript' tearDown: '#basicTearDownScript'> | index low test distance high | low := 1. high := aCollection size. diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/errorMethod..st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/errorMethod..st index 971c6f2f..f97418ea 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/errorMethod..st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/errorMethod..st @@ -1,5 +1,5 @@ example methods errorMethod: aNumber - - + >#testWorking'> +>#testThrowsError'> ^ 1 / aNumber \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodOnlyWithExample.st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodOnlyWithExample.st index de727190..ed522cd5 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodOnlyWithExample.st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodOnlyWithExample.st @@ -1,4 +1,4 @@ as yet unclassified methodOnlyWithExample - + >#testSomeExample'> ^ 2 \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodWithLiveSpecimen..st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodWithLiveSpecimen..st index e896aaa5..bf76a94f 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodWithLiveSpecimen..st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodWithLiveSpecimen..st @@ -1,4 +1,4 @@ as yet unclassified methodWithLiveSpecimen: anObject - + >#testLiveExample'> "Do not change the reference. The UUID is used in the corresponding test case" \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/schwubbleMethod.st b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/schwubbleMethod.st index d7e0f710..e5951583 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/schwubbleMethod.st +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/schwubbleMethod.st @@ -1,8 +1,8 @@ example methods schwubbleMethod - - - + >#testExample1' > + >#testSomeExample97' > + >#testSomeExample52' > -| a | a := 2 + 3. - ^ a \ No newline at end of file + | a | a := 2 + 3. + ^ a \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/methodProperties.json b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/methodProperties.json index c5fb3334..1ef13d7c 100644 --- a/packages/Babylonian-Tests.package/BPTestExamplesClass.class/methodProperties.json +++ b/packages/Babylonian-Tests.package/BPTestExamplesClass.class/methodProperties.json @@ -6,13 +6,13 @@ "one" : "pre 7/1/2019 14:22" }, "instance" : { "+" : "pre 7/1/2019 14:23", - "addAndLog:" : "jb 1/2/2021 21:39", - "binarySearchIn:theElement:" : "jb 1/12/2021 20:43", - "errorMethod:" : "jb 1/2/2021 21:36", - "methodOnlyWithExample" : "jb 1/2/2021 21:17", - "methodWithLiveSpecimen:" : "jb 1/2/2021 20:57", + "addAndLog:" : "jb 2/2/2021 13:58", + "binarySearchIn:theElement:" : "jb 2/2/2021 14:26", + "errorMethod:" : "jb 2/2/2021 20:33", + "methodOnlyWithExample" : "jb 2/2/2021 12:59", + "methodWithLiveSpecimen:" : "jb 2/2/2021 15:04", "methodWithScriptExamples" : "jb 1/2/2021 20:57", "otherMethod" : "pre 11/9/2019 14:59", "plainMethod" : "pre 11/18/2019 12:07", - "schwubbleMethod" : "jb 1/2/2021 21:18", + "schwubbleMethod" : "jb 2/2/2021 13:12", "sliderMethod" : "pre 1/24/2020 17:19" } } diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/README.md b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testBasic.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testBasic.st new file mode 100644 index 00000000..337a08f5 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testBasic.st @@ -0,0 +1,5 @@ +tests +testBasic + "Generated from an example, do not modify" + + self assert: (2) equals: ((BPTestExamplesClass empty) binarySearchIn: #(3 1 2) theElement: (1)) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testComplexExample.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testComplexExample.st new file mode 100644 index 00000000..4c1da127 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testComplexExample.st @@ -0,0 +1,5 @@ +tests +testComplexExample + "Generated from an example, do not modify" + + (BPTestExamplesClass empty) binarySearchIn: {Date yesterday . DateAndTime tomorrow . Date today} theElement: (Date today) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testErrorExample.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testErrorExample.st new file mode 100644 index 00000000..49425a76 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testErrorExample.st @@ -0,0 +1,5 @@ +tests +testErrorExample + "Generated from an example, do not modify" + + (BPTestExamplesClass empty) binarySearchIn: #(3 1 2) theElement: (3) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testExample1.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testExample1.st new file mode 100644 index 00000000..c2326cff --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testExample1.st @@ -0,0 +1,5 @@ +tests +testExample1 + "Generated from an example, do not modify" + + self assert: (5) equals: ((BPTestExamplesClass new) schwubbleMethod) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testLargeNumber.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testLargeNumber.st new file mode 100644 index 00000000..08cfda16 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testLargeNumber.st @@ -0,0 +1,5 @@ +tests +testLargeNumber + "Generated from an example, do not modify" + + (BPTestExamplesClass one) addAndLog: 94280292019202 \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallExample.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallExample.st new file mode 100644 index 00000000..14e3e98f --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallExample.st @@ -0,0 +1,5 @@ +tests +testSmallExample + "Generated from an example, do not modify" + + (BPTestExamplesClass empty) binarySearchIn: #(3 1 2) theElement: (1) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallNumber.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallNumber.st new file mode 100644 index 00000000..9ec845ba --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSmallNumber.st @@ -0,0 +1,5 @@ +tests +testSmallNumber + "Generated from an example, do not modify" + + self assert: (21) equals: ((BPTestExamplesClass one) addAndLog: 20) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample.st new file mode 100644 index 00000000..4e6bfb5a --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample.st @@ -0,0 +1,5 @@ +tests +testSomeExample + "Generated from an example, do not modify" + + (BPTestExamplesClass new) methodOnlyWithExample \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample52.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample52.st new file mode 100644 index 00000000..314c0a71 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample52.st @@ -0,0 +1,5 @@ +tests +testSomeExample52 + "Generated from an example, do not modify" + + self assert: (BPTestExamplesClass one) equals: ((BPTestExamplesClass one) schwubbleMethod) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample97.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample97.st new file mode 100644 index 00000000..5d0311e0 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testSomeExample97.st @@ -0,0 +1,5 @@ +tests +testSomeExample97 + "Generated from an example, do not modify" + + self assert: (BPTestExamplesClass one) equals: ((BPTestExamplesClass one) schwubbleMethod) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testThrowsError.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testThrowsError.st new file mode 100644 index 00000000..80c52381 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testThrowsError.st @@ -0,0 +1,5 @@ +tests +testThrowsError + "Generated from an example, do not modify" + + self should: [(BPTestExamplesClass new) errorMethod: 0] raise: ZeroDivide \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testWorking.st b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testWorking.st new file mode 100644 index 00000000..800315d1 --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/instance/testWorking.st @@ -0,0 +1,5 @@ +tests +testWorking + "Generated from an example, do not modify" + + self assert: (0.5) equals: ((BPTestExamplesClass new) errorMethod: 2) \ No newline at end of file diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/methodProperties.json b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/methodProperties.json new file mode 100644 index 00000000..33c9a96b --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/methodProperties.json @@ -0,0 +1,16 @@ +{ + "class" : { + }, + "instance" : { + "testBasic" : "jb 2/2/2021 12:49", + "testComplexExample" : "jb 2/2/2021 12:51", + "testErrorExample" : "jb 2/2/2021 12:50", + "testExample1" : "jb 2/1/2021 19:00", + "testLargeNumber" : "jb 2/2/2021 13:58", + "testSmallExample" : "jb 2/2/2021 12:49", + "testSmallNumber" : "jb 2/1/2021 19:00", + "testSomeExample" : "jb 2/2/2021 12:58", + "testSomeExample52" : "jb 2/1/2021 19:00", + "testSomeExample97" : "jb 2/1/2021 19:00", + "testThrowsError" : "jb 2/1/2021 19:00", + "testWorking" : "jb 2/1/2021 19:00" } } diff --git a/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/properties.json b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/properties.json new file mode 100644 index 00000000..ebf1856f --- /dev/null +++ b/packages/Babylonian-Tests.package/BPTestExamplesClassTest.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "Babylonian-Tests-Fixtures-Test", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BPTestExamplesClassTest", + "pools" : [ + ], + "super" : "TestCase", + "type" : "normal" } diff --git a/packages/Babylonian-Tests.package/monticello.meta/categories.st b/packages/Babylonian-Tests.package/monticello.meta/categories.st index 13fb52c1..de8101c7 100644 --- a/packages/Babylonian-Tests.package/monticello.meta/categories.st +++ b/packages/Babylonian-Tests.package/monticello.meta/categories.st @@ -2,3 +2,4 @@ SystemOrganization addCategory: #'Babylonian-Tests-Core-Serializing'! SystemOrganization addCategory: #'Babylonian-Tests'! SystemOrganization addCategory: #'Babylonian-Tests-Fixtures'! SystemOrganization addCategory: #'Babylonian-Tests-Fixtures-Test'! +SystemOrganization addCategory: #'Babylonian-Tests-Test'! diff --git a/packages/Babylonian-UI.package/BPExampleMorph.class/methodProperties.json b/packages/Babylonian-UI.package/BPExampleMorph.class/methodProperties.json index 62df64c1..8da7e736 100644 --- a/packages/Babylonian-UI.package/BPExampleMorph.class/methodProperties.json +++ b/packages/Babylonian-UI.package/BPExampleMorph.class/methodProperties.json @@ -8,8 +8,11 @@ "addDeleteButtonMorph" : "pre 1/6/2021 19:14", "addExampleConfigurationButtonMorph" : "pre 1/21/2021 18:33", "addExampleNameMorph" : "pre 1/21/2021 18:21", + "addExampleResultMorph" : "1/31/2021 19:08:42", "addExampleSpecificMorphs" : "pre 1/21/2021 18:05", + "addExpectedResultMorph" : "1/31/2021 19:08:42", "addLoaderIconHolder" : "jb 12/7/2020 18:58", + "addSimpleTextMorph:" : "1/31/2021 19:08:42", "collapse" : "pre 1/21/2021 18:16", "collapseButton" : "pre 1/8/2021 14:09", "collapseButtonClicked" : "pre 1/8/2021 14:07", @@ -18,12 +21,17 @@ "ensureNoLoaderIcon" : "jb 12/7/2020 18:58", "example" : "pre 9/30/2020 10:34", "example:" : "jb 12/7/2020 18:58", + "executionResultAsString:" : "1/31/2021 19:08:42", "expand" : "pre 1/21/2021 18:14", "initialize" : "pre 1/8/2021 13:38", "isCollapsed" : "pre 1/12/2021 10:20", "isExample" : "pre 9/30/2020 10:34", "isExampleActive" : "pre 9/30/2020 10:34", "removeButtonClicked" : "pre 1/21/2021 17:08", + "setColorOfExecutionResultButtonForTrace:" : "1/31/2021 19:08:42", + "setExecutionResultButtonColorAccordingTo:" : "1/31/2021 19:08:42", + "setExecutionResultButtonContentForTrace:" : "1/31/2021 19:08:42", + "setExecutionResultButtonContentToInitialState" : "1/31/2021 19:08:42", "step" : "pre 1/7/2021 09:29", "textEmphasis" : "pre 9/30/2020 10:35", "updateMorphs" : "pre 1/21/2021 16:22" } } diff --git a/packages/Babylonian-UI.package/BPMethodExampleMorph.class/methodProperties.json b/packages/Babylonian-UI.package/BPMethodExampleMorph.class/methodProperties.json index 562bf777..8ea7f529 100644 --- a/packages/Babylonian-UI.package/BPMethodExampleMorph.class/methodProperties.json +++ b/packages/Babylonian-UI.package/BPMethodExampleMorph.class/methodProperties.json @@ -4,6 +4,7 @@ "instance" : { "addArgumentScriptMorphs" : "pre 1/21/2021 18:29", "addExampleSpecificMorphs" : "pre 1/8/2021 13:48", + "addLiveSpecimenSelectionMorphFor:withTarget:" : "1/31/2021 19:08:42", "addReceiverConstructorMorph" : "pre 1/21/2021 18:29", "newSpecimenSelectionButtonOnClick:" : "pre 1/7/2021 13:27", "selectLiveSpecimenThen:" : "jb 12/7/2020 18:58" } }