Skip to content

Commit

Permalink
Clean up in 2 tests more
Browse files Browse the repository at this point in the history
* Do not send self setUp. from tests
* Remove <sampleInstance>
  • Loading branch information
tinchodias committed Jan 8, 2024
1 parent c3ebe3a commit 68761a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/Bloc-Tests/BlKeyCombinationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class {
'event',
'handler'
],
#category : 'Bloc-Tests-KeyBinding'
#category : #'Bloc-Tests-KeyBinding'
}

{ #category : #initialization }
Expand All @@ -23,9 +23,8 @@ BlKeyCombinationTest >> setUp [

{ #category : #tests }
BlKeyCombinationTest >> testKeyCodeCombination [

| shortcut flag |
<sampleInstance>
self setUp.
flag := false.

buffer pressed: true key: KeyboardKey controlLeft.
Expand All @@ -46,9 +45,8 @@ BlKeyCombinationTest >> testKeyCodeCombination [

{ #category : #tests }
BlKeyCombinationTest >> testNoMatchKeyCodeCombination [

| shortcut flag |
<sampleInstance>
self setUp.
flag := false.

buffer pressed: false key: KeyboardKey controlLeft.
Expand Down
4 changes: 1 addition & 3 deletions src/Bloc-Tests/BlShortcutTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'shortcut'
],
#category : 'Bloc-Tests-KeyBinding'
#category : #'Bloc-Tests-KeyBinding'
}

{ #category : #initialization }
Expand All @@ -16,8 +16,6 @@ BlShortcutTest >> setUp [

{ #category : #tests }
BlShortcutTest >> testMatches [
<sampleInstance>
self setUp.

shortcut combination: (BlMockedKeyCombination new shouldMatch: false).
self assert: (shortcut matches: Object new) not.
Expand Down

0 comments on commit 68761a8

Please sign in to comment.