The Trunk: TraitsTests-ul.18.mcz

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

The Trunk: TraitsTests-ul.18.mcz

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

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

Name: TraitsTests-ul.18
Author: ul
Time: 28 July 2018, 10:28:35.332678 pm
UUID: ed0b1a90-e8a4-4c2c-98a0-1af69fed6d74
Ancestors: TraitsTests-ul.17

- do not ask the user about author initials

=============== Diff against TraitsTests-ul.17 ===============

Item was changed:
  ----- Method: TraitFileOutTest>>setUp (in category 'running') -----
  setUp
+
  super setUp.
+ Utilities
+ useAuthorInitials: self className
+ during: [
+ SystemOrganization addCategory: self categoryName.
- SystemOrganization addCategory: self categoryName.
 
+ td := self createTraitNamed: #TD uses: {}.
+ td compile: 'd' classified: #cat1.
+ tc := self createTraitNamed: #TC uses: td.
+ tc compile: 'c' classified: #cat1.
+ tb := self createTraitNamed: #TB uses: td.
+ tb compile: 'b' classified: #cat1.
+ ta := self createTraitNamed: #TA uses: tb + ((tc @ {#cc->#c}) - {#c}).
+ ta compile: 'a' classified: #cat1.
- td := self createTraitNamed: #TD uses: {}.
- td compile: 'd' classified: #cat1.
- tc := self createTraitNamed: #TC uses: td.
- tc compile: 'c' classified: #cat1.
- tb := self createTraitNamed: #TB uses: td.
- tb compile: 'b' classified: #cat1.
- ta := self createTraitNamed: #TA uses: tb + ((tc @ {#cc->#c}) - {#c}).
- ta compile: 'a' classified: #cat1.
 
+ ca := self createClassNamed: #CA superclass: Object uses: {}.
+ ca compile: 'ca' classified: #cat1.
+ cb := self createClassNamed: #CB superclass: ca uses: ta.
+ cb compile: 'cb' classified: #cat1.
- ca := self createClassNamed: #CA superclass: Object uses: {}.
- ca compile: 'ca' classified: #cat1.
- cb := self createClassNamed: #CB superclass: ca uses: ta.
- cb compile: 'cb' classified: #cat1.
 
+ "make the class of cb also use tc:"
+ cb class uses: ta classTrait + tc instanceVariableNames: '' ]!
- "make the class of cb also use tc:"
- cb class uses: ta classTrait + tc instanceVariableNames: ''.!

Item was changed:
+ ----- Method: TraitsResource>>setUp (in category 'running') -----
- ----- Method: TraitsResource>>setUp (in category 'as yet unclassified') -----
  setUp
  "Please note, that most tests rely on this setup of traits and
  classes - and that especially the order of the definitions matters."
  "SetUpCount := SetUpCount + 1."
 
  dirty := false.
+ Utilities
+ useAuthorInitials: self className
+ during: [
+ SystemChangeNotifier uniqueInstance doSilently: [
+ self t1: (self createTraitNamed: #T1 uses: { }).
+ self t1 comment: 'I am the trait T1'.
+ self t2: (self createTraitNamed: #T2 uses: { }).
+ self t2 compile: 'm21 ^21' classified: #cat1.
+ self t2 compile: 'm22 ^22' classified: #cat2.
+ self t2 classSide compile: 'm2ClassSide: a ^a'.
+ self t3: (self createTraitNamed: #T3 uses: { }).
+ self t3 compile: 'm31 ^31' classified: #cat1.
+ self t3 compile: 'm32 ^32' classified: #cat2.
+ self t3 compile: 'm33 ^33' classified: #cat3.
+ self t4: (self createTraitNamed: #T4 uses: { (self t1). (self t2) }).
+ self t4 compile: 'm11 ^41' classified: #catX. "overrides T1>>m11"
+ self t4 compile: 'm42 ^42' classified: #cat2.
+ self t5: (self createTraitNamed: #T5 uses: self t1 + self t2).
+ self t5 compile: 'm51 ^super foo' classified: #cat1.
+ self t5 compile: 'm52 ^ self class bar' classified: #cat1.
+ self t5 compile: 'm53 ^ self class bar' classified: #cat1.
+ self t6: (self
+ createTraitNamed: #T6
+ uses: (self t1 + (self t2 @ { (#m22Alias -> #m22) }))).
+ self c1: (
+ self
- SystemChangeNotifier uniqueInstance doSilently:
- [self t1: (self createTraitNamed: #T1
- uses: { }).
- self t1 comment: 'I am the trait T1'.
- self t2: (self createTraitNamed: #T2
- uses: { }).
- self t2 compile: 'm21 ^21' classified: #cat1.
- self t2 compile: 'm22 ^22' classified: #cat2.
- self t2 classSide compile: 'm2ClassSide: a ^a'.
- self t3: (self createTraitNamed: #T3
- uses: { }).
- self t3 compile: 'm31 ^31' classified: #cat1.
- self t3 compile: 'm32 ^32' classified: #cat2.
- self t3 compile: 'm33 ^33' classified: #cat3.
- self t4: (self createTraitNamed: #T4
- uses: { (self t1). (self t2) }).
- self t4 compile: 'm11 ^41' classified: #catX. "overrides T1>>m11"
- self t4 compile: 'm42 ^42' classified: #cat2.
- self t5: (self createTraitNamed: #T5 uses: self t1 + self t2).
- self t5 compile: 'm51 ^super foo' classified: #cat1.
- self t5 compile: 'm52 ^ self class bar' classified: #cat1.
- self t5 compile: 'm53 ^ self class bar' classified: #cat1.
- self t6: (self createTraitNamed: #T6
- uses: (self t1 + (self t2 @ { (#m22Alias -> #m22) }))).
- self c1: (self
  createClassNamed: #C1
  superclass: Object
  uses: { }).
+ self c1 compile: 'foo ^true' classified: #accessing.
+ self t1 compile: 'm11 ^11' classified: #cat1.
+ self t1 compile: 'm12 ^12' classified: #cat2.
+ self t1 compile: 'm13 ^self m12' classified: #cat3.
+ self c2: (self
+ createClassNamed: #C2
+ superclass: self c1
+ uses: self t5 - { #m11 }).
+ self c2 compile: 'foo ^false' classified: #private.
+ self c2 compile: 'bar ^self foo' classified: #private.
+ self setUpTrivialRequiresFixture.
+ self setUpTwoLevelRequiresFixture.
+ self setUpTranslatingRequiresFixture ] ].
- self c1 compile: 'foo ^true' classified: #accessing.
- self t1 compile: 'm11 ^11' classified: #cat1.
- self t1 compile: 'm12 ^12' classified: #cat2.
- self t1 compile: 'm13 ^self m12' classified: #cat3.
- self c2: (self
- createClassNamed: #C2
- superclass: self c1
- uses: self t5 - { #m11 }).
- self c2 compile: 'foo ^false' classified: #private.
- self c2 compile: 'bar ^self foo' classified: #private.
- self setUpTrivialRequiresFixture.
- self setUpTwoLevelRequiresFixture.
- self setUpTranslatingRequiresFixture].
  SystemChangeNotifier uniqueInstance notify: self ofAllSystemChangesUsing: #codeChangedEvent:!

Item was changed:
+ ----- Method: TraitsResource>>tearDown (in category 'running') -----
- ----- Method: TraitsResource>>tearDown (in category 'as yet unclassified') -----
  tearDown
 
  SystemChangeNotifier uniqueInstance noMoreNotificationsFor: self.
  self createdClassesAndTraits do:
  [:aClassOrTrait | | behaviorName |
  behaviorName := aClassOrTrait name.
  Smalltalk at: behaviorName
  ifPresent: [:classOrTrait | classOrTrait removeFromSystem].
  ChangeSet current removeClassChanges: behaviorName].
  createdClassesAndTraits := self t1: (self
  t2: (self t3: (self
  t4: (self t5: (self
  t6: (self c1: (self
  c2: (self c3: (self c4: (self c5: (self c6: (self c7: (self c8: nil)))))))))))))!

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