The Trunk: Tests-ul.399.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-ul.399.mcz

commits-2
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.399.mcz

==================== Summary ====================

Name: Tests-ul.399
Author: ul
Time: 14 June 2018, 11:52:11.181454 pm
UUID: 97402558-dca6-4e93-bcfb-7d30ff83945b
Ancestors: Tests-ul.398

- do not nag the user about setting the author initials #3

=============== Diff against Tests-ul.398 ===============

Item was added:
+ ----- Method: RecentMessagesTest>>performTest (in category 'private') -----
+ performTest
+
+ Utilities
+ useAuthorInitials: self className
+ during: [ super performTest ]!

Item was changed:
+ ----- Method: SystemNavigationTest>>createClass: (in category 'helpers') -----
- ----- Method: SystemNavigationTest>>createClass: (in category 'as yet unclassified') -----
  createClass: aSymbol
  | builder |
  builder := ClassBuilder new.
  ^ builder
  name: aSymbol
  inEnvironment: env
  subclassOf: Object
  type: #normal
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Test'.!

Item was changed:
+ ----- Method: SystemNavigationTest>>createTrait: (in category 'helpers') -----
- ----- Method: SystemNavigationTest>>createTrait: (in category 'as yet unclassified') -----
  createTrait: aSymbol
  ^ Trait
  named: aSymbol
  uses: #()
  category: 'Traits'
  env: env.!

Item was changed:
+ ----- Method: SystemNavigationTest>>setUp (in category 'running') -----
- ----- Method: SystemNavigationTest>>setUp (in category 'as yet unclassified') -----
  setUp
  | g p t |
  env := Environment named: 'test'.
  g := self createClass: #Griffle.
  p := self createClass: #Plonk.
+ g compileSilently: 'foo ^ 1'.
+ g class compileSilently: 'classFoo ^ 1'.
+ g compileSilently: 'bar ^ 1'.
+ p compileSilently: 'foo ^ 2'.
- g compile: 'foo ^ 1'.
- g class compile: 'classFoo ^ 1'.
- g compile: 'bar ^ 1'.
- p compile: 'foo ^ 2'.
  t := self createTrait: #TGriffle.
+ t compileSilently: 'baz ^ Griffle new foo + Plonk new bar'.
- t compile: 'baz ^ Griffle new foo + Plonk new bar'.
  self createClass: #Unused.
  sysNav := SystemNavigation for: env.!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllClassesDoShouldIterateOverClassesInAnEnvironment (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllClassesDoShouldIterateOverClassesInAnEnvironment (in category 'as yet unclassified') -----
  testAllClassesDoShouldIterateOverClassesInAnEnvironment
  | classes |
  classes := OrderedCollection new.
  sysNav allClassesDo: [:cls |
  classes add: cls].
  self assert: env allClasses equals: classes asArray.!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllClassesShouldReturnEnvironmentsClasses (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllClassesShouldReturnEnvironmentsClasses (in category 'as yet unclassified') -----
  testAllClassesShouldReturnEnvironmentsClasses
  self assert: env allClasses equals: sysNav allClasses.!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllImplementedMessagesWithout (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllImplementedMessagesWithout (in category 'as yet unclassified') -----
  testAllImplementedMessagesWithout
 
  self assert: #(bar baz classFoo) asIdentitySet
  equals: (sysNav allImplementedMessagesWithout: {{env at: #Griffle}. {#foo}}).!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllImplementorsOf (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllImplementorsOf (in category 'as yet unclassified') -----
  testAllImplementorsOf
  self assert: (OrderedCollection
  with: (MethodReference class: (env at: #Griffle) selector: #foo)
  with: (MethodReference class: (env at: #Plonk) selector: #foo))
  equals: (sysNav allImplementorsOf: #foo).!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllImplementorsOfClassSide (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllImplementorsOfClassSide (in category 'as yet unclassified') -----
  testAllImplementorsOfClassSide
  self assert: (OrderedCollection
  with: (MethodReference class: (env at: #Griffle) class selector: #classFoo))
  equals: (sysNav allImplementorsOf: #classFoo).!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllSentMessagesWithout (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllSentMessagesWithout (in category 'as yet unclassified') -----
  testAllSentMessagesWithout
 
  self
  assert: (#(foo bar) asIdentitySet
  addAll: Smalltalk presumedSentMessages;
  addAll: Smalltalk specialSelectorNames;
  yourself)
  equals: (sysNav allSentMessagesWithout: {{env at: #Griffle}. {#+}}).!

Item was changed:
+ ----- Method: SystemNavigationTest>>testAllUnusedClassesWithout (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testAllUnusedClassesWithout (in category 'as yet unclassified') -----
  testAllUnusedClassesWithout
  self assert: (IdentitySet with: #Unused) equals: ((SystemNavigation for: env) allUnusedClassesWithout: {{}. {}}).
  "The classes passed to #allUnusedClassesWithout: are not filtered from the list. They're classes whose methods are not examined for global references."
  self deny: ((SystemNavigation for: env) allUnusedClassesWithout: {{#Unused}. {}}) isEmpty description: 'Where did Unused go?'.!

Item was changed:
+ ----- Method: SystemNavigationTest>>testDefaultAllClassesAndTraitsShouldReturnTopEnvironmentClassesAndTraits (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testDefaultAllClassesAndTraitsShouldReturnTopEnvironmentClassesAndTraits (in category 'as yet unclassified') -----
  testDefaultAllClassesAndTraitsShouldReturnTopEnvironmentClassesAndTraits
  self assert: Smalltalk allClassesAndTraits equals: SystemNavigation default allClassesAndTraits.!

Item was changed:
+ ----- Method: SystemNavigationTest>>testDefaultAllClassesShouldReturnTopEnvironmentClasses (in category 'tests') -----
- ----- Method: SystemNavigationTest>>testDefaultAllClassesShouldReturnTopEnvironmentClasses (in category 'as yet unclassified') -----
  testDefaultAllClassesShouldReturnTopEnvironmentClasses
  self assert: Smalltalk allClasses equals: SystemNavigation default allClasses.!