Frank Shearar uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-fbs.581.mcz
==================== Summary ====================
Name: Monticello-fbs.581
Author: fbs
Time: 18 January 2014, 4:58:44.499 pm
UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
Ancestors: Monticello-cmm.580
When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
=============== Diff against Monticello-cmm.580 ===============
Item was changed:
----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
getMenu: aMenu
+ | menuSpecs |
+ menuSpecs := (self selectedInfo ancestors collect: [:parent |
- self selection < 2 ifTrue: [^ aMenu].
- self fillMenu: aMenu fromSpecs:
- {{'view changes to ', ancestry name . #viewChanges}},
- (self selectedInfo ancestors collect: [:parent |
{'view changes from ', parent name . #viewChanges: . parent}]),
#(('spawn history' spawnHistory)
('search history' searchHistory)).
+ self selection > 1 ifTrue: [
+ menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
+
+ self fillMenu: aMenu fromSpecs: menuSpecs.
^ aMenu!
Frank Shearar uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-fbs.581.mcz
==================== Summary ====================
Name: Monticello-fbs.581
Author: fbs
Time: 18 January 2014, 4:58:44.499 pm
UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
Ancestors: Monticello-cmm.580
When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
=============== Diff against Monticello-cmm.580 ===============
Item was changed:
----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
getMenu: aMenu
+ | menuSpecs |
+ menuSpecs := (self selectedInfo ancestors collect: [:parent |
- self selection < 2 ifTrue: [^ aMenu].
- self fillMenu: aMenu fromSpecs:
- {{'view changes to ', ancestry name . #viewChanges}},
- (self selectedInfo ancestors collect: [:parent |
{'view changes from ', parent name . #viewChanges: . parent}]),
#(('spawn history' spawnHistory)
('search history' searchHistory)).
+ self selection > 1 ifTrue: [
+ menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
+
+ self fillMenu: aMenu fromSpecs: menuSpecs.
^ aMenu!
Frank Shearar uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-fbs.581.mcz
==================== Summary ====================
Name: Monticello-fbs.581
Author: fbs
Time: 18 January 2014, 4:58:44.499 pm
UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
Ancestors: Monticello-cmm.580
When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
=============== Diff against Monticello-cmm.580 ===============
Item was changed:
----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
getMenu: aMenu
+ | menuSpecs |
+ menuSpecs := (self selectedInfo ancestors collect: [:parent |
- self selection < 2 ifTrue: [^ aMenu].
- self fillMenu: aMenu fromSpecs:
- {{'view changes to ', ancestry name . #viewChanges}},
- (self selectedInfo ancestors collect: [:parent |
{'view changes from ', parent name . #viewChanges: . parent}]),
#(('spawn history' spawnHistory)
('search history' searchHistory)).
+ self selection > 1 ifTrue: [
+ menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
+
+ self fillMenu: aMenu fromSpecs: menuSpecs.
^ aMenu!
Frank Shearar uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-fbs.99.mcz
==================== Summary ====================
Name: SUnit-fbs.99
Author: fbs
Time: 9 January 2014, 2:05:18.527 pm
UUID: a5be81dd-6e9f-8d41-a091-3c6c27a28abe
Ancestors: SUnit-cmm.98
Basic #assert:identical: implementation.
Suggestions for a better error message welcome!
=============== Diff against SUnit-cmm.98 ===============
Item was added:
+ ----- Method: SUnitTest>>testAssertIdentical (in category 'testing') -----
+ testAssertIdentical
+ | a b |
+ a := 'foo'.
+ b := 'bar'.
+ self should: [self assert: a identical: b] raise: TestFailure.
+ [self assert: a identical: b] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: a) description: 'Error message doesn''t include the expected value'.
+ self assert: (error includesSubString: b) description: 'Error message doesn''t include the expected value'].!
Item was added:
+ ----- Method: SUnitTest>>testAssertIdenticalDescription (in category 'testing') -----
+ testAssertIdenticalDescription
+ | a b |
+ a := 'foo'.
+ b := a copy.
+ self should: [self assert: a identical: b description: 'A desciption'] raise: TestFailure.
+ [self assert: a identical: b description: 'A desciption'] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: 'A desciption') description: 'Error message doesn''t give you the description'].!
Item was added:
+ ----- Method: SUnitTest>>testAssertIdenticalWithEqualObjects (in category 'testing') -----
+ testAssertIdenticalWithEqualObjects
+ | a b |
+ a := 'foo'.
+ b := a copy.
+ self should: [self assert: a identical: b] raise: TestFailure.
+ [self assert: a identical: b] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].!
Item was added:
+ ----- Method: TestCase>>assert:identical: (in category 'accessing') -----
+ assert: expected identical: actual
+
+ ^self
+ assert: expected == actual
+ description: [ self comparingStringBetweenIdentical: expected and: actual ]
+ !
Item was added:
+ ----- Method: TestCase>>assert:identical:description: (in category 'accessing') -----
+ assert: expected identical: actual description: aString
+
+ ^self
+ assert: expected == actual
+ description: [ aString , ': ', (self comparingStringBetweenIdentical: expected and: actual) ]!
Item was added:
+ ----- Method: TestCase>>comparingStringBetweenIdentical:and: (in category 'private') -----
+ comparingStringBetweenIdentical: expected and: actual
+ ^ 'Expected {1} and actual {2} are not identical.' format: {
+ expected printStringLimitedTo: 10.
+ actual printStringLimitedTo: 10.
+ }!
Frank Shearar uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-fbs.99.mcz
==================== Summary ====================
Name: SUnit-fbs.99
Author: fbs
Time: 9 January 2014, 2:05:18.527 pm
UUID: a5be81dd-6e9f-8d41-a091-3c6c27a28abe
Ancestors: SUnit-cmm.98
Basic #assert:identical: implementation.
Suggestions for a better error message welcome!
=============== Diff against SUnit-cmm.98 ===============
Item was added:
+ ----- Method: SUnitTest>>testAssertIdentical (in category 'testing') -----
+ testAssertIdentical
+ | a b |
+ a := 'foo'.
+ b := 'bar'.
+ self should: [self assert: a identical: b] raise: TestFailure.
+ [self assert: a identical: b] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: a) description: 'Error message doesn''t include the expected value'.
+ self assert: (error includesSubString: b) description: 'Error message doesn''t include the expected value'].!
Item was added:
+ ----- Method: SUnitTest>>testAssertIdenticalDescription (in category 'testing') -----
+ testAssertIdenticalDescription
+ | a b |
+ a := 'foo'.
+ b := a copy.
+ self should: [self assert: a identical: b description: 'A desciption'] raise: TestFailure.
+ [self assert: a identical: b description: 'A desciption'] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: 'A desciption') description: 'Error message doesn''t give you the description'].!
Item was added:
+ ----- Method: SUnitTest>>testAssertIdenticalWithEqualObjects (in category 'testing') -----
+ testAssertIdenticalWithEqualObjects
+ | a b |
+ a := 'foo'.
+ b := a copy.
+ self should: [self assert: a identical: b] raise: TestFailure.
+ [self assert: a identical: b] on: TestFailure do: [:e | |error|
+ error := e messageText.
+ self assert: (error includesSubString: 'not identical') description: 'Error message doesn''t say the two things aren''t identical'].!
Item was added:
+ ----- Method: TestCase>>assert:identical: (in category 'accessing') -----
+ assert: expected identical: actual
+
+ ^self
+ assert: expected == actual
+ description: [ self comparingStringBetweenIdentical: expected and: actual ]
+ !
Item was added:
+ ----- Method: TestCase>>assert:identical:description: (in category 'accessing') -----
+ assert: expected identical: actual description: aString
+
+ ^self
+ assert: expected == actual
+ description: [ aString , ': ', (self comparingStringBetweenIdentical: expected and: actual) ]!
Item was added:
+ ----- Method: TestCase>>comparingStringBetweenIdentical:and: (in category 'private') -----
+ comparingStringBetweenIdentical: expected and: actual
+ ^ 'Expected {1} and actual {2} are not identical.' format: {
+ expected printStringLimitedTo: 10.
+ actual printStringLimitedTo: 10.
+ }!