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

Simplify debugger test code #599

Merged
merged 1 commit into from
Oct 10, 2023
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ StDebuggerExtensionMechanismTest >> setUp [
{ #category : 'running' }
StDebuggerExtensionMechanismTest >> tearDown [

| allDebuggerExtensions testClass |
testClass := StDebuggerExtensionGeneratorForTests testClass.
| allDebuggerExtensions |
allDebuggerExtensions := StDebugger extensionToolsClasses.
allDebuggerExtensions do: [ :extension |
| wasActivated |
wasActivated := oldActivatedExtensions includes: extension.
extension showInDebugger = wasActivated ifFalse: [
extension showInDebugger: wasActivated ] ].
testClass showInDebugger: false.
TStDebuggerExtensionTestClass showInDebugger: false.
StDummyDebuggerPresenter showInDebugger: false.
self disableTStDebuggerExtensionTestClassAsExtension.
super tearDown
Expand Down Expand Up @@ -117,13 +116,9 @@ StDebuggerExtensionMechanismTest >> testExtensionToolsClasses [
{ #category : 'tests - extensions' }
StDebuggerExtensionMechanismTest >> testHasAnyActivatedExtensions [

| testClass |
testClass := StDebuggerExtensionGeneratorForTests testClass.
self deny:
(self debuggerClass hasAnyActivatedExtension: { testClass }).
testClass showInDebugger: true.
self assert:
(self debuggerClass hasAnyActivatedExtension: { testClass })
self deny: (self debuggerClass hasAnyActivatedExtension: { TStDebuggerExtensionTestClass }).
TStDebuggerExtensionTestClass showInDebugger: true.
self assert: (self debuggerClass hasAnyActivatedExtension: { TStDebuggerExtensionTestClass })
]

{ #category : 'tests - extensions' }
Expand Down Expand Up @@ -152,8 +147,7 @@ StDebuggerExtensionMechanismTest >> testRegisterExtensionTool [
{ #category : 'tests - extensions' }
StDebuggerExtensionMechanismTest >> testUsesExtensions [

| testClass extensionClasses activatedExtension |
testClass := StDebuggerExtensionGeneratorForTests testClass.
| extensionClasses activatedExtension |

"In case there are no available extensions in the system, we add a test extension to the system.
We then assume that there is always one extension in the extension collection of the system."
Expand Down
4 changes: 2 additions & 2 deletions src/NewTools-Debugger-Tests/TStDebuggerExtensionTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Class {
{ #category : 'running' }
TStDebuggerExtensionTest >> setUp [
super setUp.
traitUser := StDebuggerExtensionGeneratorForTests testClass new
traitUser := TStDebuggerExtensionTestClass new
]

{ #category : 'running' }
TStDebuggerExtensionTest >> tearDown [

traitUser class displayOrder: 1.
traitUser := nil.
StDebuggerExtensionGeneratorForTests testClass showInDebugger: false.
TStDebuggerExtensionTestClass showInDebugger: false.
super tearDown
]

Expand Down
Loading