Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Tonel V3 #97

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/BaselineOfSindarin/BaselineOfSindarin.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #BaselineOfSindarin,
#superclass : #BaselineOf,
#category : #BaselineOfSindarin
#name : 'BaselineOfSindarin',
#superclass : 'BaselineOf',
#category : 'BaselineOfSindarin',
#package : 'BaselineOfSindarin'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfSindarin >> baseline: spec [

<baseline>
Expand All @@ -21,7 +22,7 @@ BaselineOfSindarin >> baseline: spec [
group: 'experiments' with: #( 'default' 'Sindarin-Experiments' )
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfSindarin >> postloadWithLoader: loader withPackageSpec: spec [

InstructionStream compiledMethodAt: #willJumpIfFalse ifAbsent: [
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfSindarin/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfSindarin }
Package { #name : 'BaselineOfSindarin' }
17 changes: 9 additions & 8 deletions src/Sindarin-Demo/SindarinDemo.class.st
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
Class {
#name : #SindarinDemo,
#superclass : #Object,
#name : 'SindarinDemo',
#superclass : 'Object',
#instVars : [
'count'
],
#category : #'Sindarin-Demo'
#category : 'Sindarin-Demo',
#package : 'Sindarin-Demo'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo >> doThings1 [
1+1.
ZeroDivide signal.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo >> doThings2 [
Point x: 2 y: 2.
SubscriptOutOfBounds signal.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo >> doThingsAndSignalExceptions [
self doThings1.
Error signal.
self doThings2.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo >> primeCount [
count := 0.
{ 2. 3. 5. 7. 10. 11. 13. 17. 19. 23 } do: [:int | count := count + int ]

]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo >> primeCountHalt [.
count := 0.
self halt.
Expand Down
27 changes: 14 additions & 13 deletions src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,62 @@ dbg step: 3; stepOver: 2; step: 3.

"
Class {
#name : #'SindarinDemo_GoldDigger',
#superclass : #Object,
#category : #'Sindarin-Demo'
#name : 'SindarinDemo_GoldDigger',
#superclass : 'Object',
#category : 'Sindarin-Demo',
#package : 'Sindarin-Demo'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> gold [
^ 42
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> moreRock [
^self
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock [
self halt.
self rock1
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock1 [
self rock2
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock2 [
self rock3
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock3 [
self moreRock.
self moreRock.
self rock4.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock4 [
self rock5.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock5 [
self rock6.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> rock6 [
"Relevant point for the bug you are tracking"
self gold.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
SindarinDemo_GoldDigger >> start [
self rock
]
23 changes: 12 additions & 11 deletions src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,50 @@ dbg := SindarinDebugger debug: [ SindarinDemo_SkipNextException new start ].
dbg skip.
"
Class {
#name : #'SindarinDemo_SkipNextException',
#superclass : #Object,
#category : #'Sindarin-Demo'
#name : 'SindarinDemo_SkipNextException',
#superclass : 'Object',
#category : 'Sindarin-Demo',
#package : 'Sindarin-Demo'
}

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method1 [
self halt.
self method2.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method2 [
self method3.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method3 [
self method4.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method4 [
self method5.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method5 [
Error signal: 'Something truly unexpected happened :)'.
self method6.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method6 [
self method7.
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> method7 [
^ 42
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_SkipNextException >> start [
self method1
]
11 changes: 6 additions & 5 deletions src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Class {
#name : #'SindarinDemo_StepToNextIteration',
#superclass : #Object,
#category : #'Sindarin-Demo'
#name : 'SindarinDemo_StepToNextIteration',
#superclass : 'Object',
#category : 'Sindarin-Demo',
#package : 'Sindarin-Demo'
}

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_StepToNextIteration >> start [
self sum
]

{ #category : #accessing }
{ #category : 'accessing' }
SindarinDemo_StepToNextIteration >> sum [
| count |
self halt.
Expand Down
2 changes: 1 addition & 1 deletion src/Sindarin-Demo/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Sindarin-Demo' }
Package { #name : 'Sindarin-Demo' }
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Class {
#name : #'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass',
#superclass : #TestCase,
#name : 'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass',
#superclass : 'TestCase',
#instVars : [
'breakpointsBeforeTest'
],
#category : #'Sindarin-Experiments'
#category : 'Sindarin-Experiments',
#package : 'Sindarin-Experiments'
}

{ #category : #tests }
{ #category : 'tests' }
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> helperMethod13 [
| a |
a := 5.
^ Point x: 5 y: '3' asInteger.
]

{ #category : #running }
{ #category : 'running' }
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [
"This prevents the TestExecutionEnvironment from trying to kill processes created during the test. Without it, it adds on:do: contexts on the process, and this somehow makes the process answers true to isTerminating, triggering the protection against stepping terminating processes from DebugSessionPlus>>stepInto:
It is not necessary to terminate processes created by ScriptableDebugger because these processes are not scheduled."
Expand All @@ -23,20 +24,20 @@ Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [
^ self runCase.
]

{ #category : #running }
{ #category : 'running' }
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> setUp [
"Hooks that subclasses may override to define the fixture of test."
breakpointsBeforeTest := VirtualBreakpoint all.
VirtualBreakpoint all removeAll.
]

{ #category : #running }
{ #category : 'running' }
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> tearDown [
VirtualBreakpoint all removeAll.
breakpointsBeforeTest do: [ :brkpt | VirtualBreakpoint all add: brkpt ].
]

{ #category : #tests }
{ #category : 'tests' }
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> testStep [
<haltOrBreakpointForTesting>
| node scdbg |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,30 @@ scdbg1 activateAutoRefreshOfAttachedGraphicalDebugger. scdbg2 activateAutoRefres
scdbg2 refreshAttachedGraphicalDebugger
"
Class {
#name : #ExampleExecutionStackTransform1,
#superclass : #TestCase,
#name : 'ExampleExecutionStackTransform1',
#superclass : 'TestCase',
#instVars : [
'stack',
'expected'
],
#category : #'Sindarin-Experiments'
#category : 'Sindarin-Experiments',
#package : 'Sindarin-Experiments'
}

{ #category : #running }
{ #category : 'running' }
ExampleExecutionStackTransform1 >> setUp [
stack := Stack new.
stack push: $3; push: 'b'; push: $a.
expected := Stack new.
expected push: '3'; push: 'b'; push: 'a'.
]

{ #category : #tests }
{ #category : 'tests' }
ExampleExecutionStackTransform1 >> testTransformStack [
[expected isEmpty] whileFalse: [ self transformTopStack. self assert: (stack pop) equals: (expected pop) ].
]

{ #category : #tests }
{ #category : 'tests' }
ExampleExecutionStackTransform1 >> transformTopStack [
(stack top isInteger) ifTrue: [ stack push: (stack pop asCharacterDigit) ].
(stack top isCharacter) ifTrue: [ stack push: (stack pop asString) ].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #ExampleExecutionStackTransform2,
#superclass : #ExampleExecutionStackTransform1,
#category : #'Sindarin-Experiments'
#name : 'ExampleExecutionStackTransform2',
#superclass : 'ExampleExecutionStackTransform1',
#category : 'Sindarin-Experiments',
#package : 'Sindarin-Experiments'
}

{ #category : #running }
{ #category : 'running' }
ExampleExecutionStackTransform2 >> setUp [
stack := Stack new.
stack push: 3; push: 'b'; push: $a.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
Class {
#name : #Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue,
#superclass : #Object,
#name : 'Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue',
#superclass : 'Object',
#instVars : [
'var'
],
#category : #'Sindarin-Experiments'
#category : 'Sindarin-Experiments',
#package : 'Sindarin-Experiments'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> doNothing [
^ 1

]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper1 [
self doNothing.
self helper2.
var := nil.
self doNothing.
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper2 [
var := 2.
self doNothing.
self helper3.

]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper3 [
var := nil.

Expand Down
Loading
Loading