Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.384.mcz ==================== Summary ==================== Name: Tests-mt.384 Author: mt Time: 23 September 2017, 10:54:37.809102 am UUID: e04a490b-01cb-bc4d-aca8-76336e7ce5a4 Ancestors: Tests-mt.383 UI Themes: Updates tests and benchmark for the latest changes in System-mt.963. =============== Diff against Tests-mt.383 =============== Item was added: + ----- Method: UserInterfaceThemeTest>>test27DanglingTheme (in category 'tests') ----- + test27DanglingTheme + + self + assert: (UserInterfaceTheme allThemes includes: UserInterfaceTheme current) + description: 'The current user interface theme is not registered.'.! Item was removed: - ----- Method: UserInterfaceThemeTest>>test27ScopeIntegrity (in category 'tests') ----- - test27ScopeIntegrity - "If application code manages to use Object >> #userInterfaceTheme without invoking the DNU dispatch directly afterwards, the theme's scope might get inconsistent. Even though this should usually never happen, check for it to be sure." - - | issues | - issues := OrderedCollection new. - UserInterfaceTheme allThemes do: [:uit | - (uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]]. - UserInterfaceTheme current in: [:uit | - (UserInterfaceTheme allThemes includes: uit) - ifFalse: [(uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]]]. - self assert: issues isEmpty description: 'Some user interface themes have an inconsistent scope state, which can interfere with GC.'.! Item was removed: - ----- Method: UserInterfaceThemeTest>>test28DanglingTheme (in category 'tests') ----- - test28DanglingTheme - - self - assert: (UserInterfaceTheme allThemes includes: UserInterfaceTheme current) - description: 'The current user interface theme is not registered.'.! Item was changed: ----- Method: UserInterfaceThemeTestObject class>>benchLookup (in category 'benchmark') ----- benchLookup " + Microsoft Surface Pro 3, Windows 10 v1703, CogVM 201708092224, Squeak 6.0alpha #17398 + Up to '280,000 per second. 3.57 microseconds per run.' -- leaves enough room for quirky morphs that keep on drawing themselves based on direct theme lookup. - Microsoft Surface Pro 3, Windows 10 v1511, CogVM r201606301459, Squeak 5.1alpha #16138 - '210,000 per second. 4.76 microseconds per run.' -- leaves enough room for quirky morphs that keep on drawing themselves based on direct theme lookup. I think this setup is really heavy. Morphs should not look-up things that often. They can cache. Anyway: - link through 3 themes - look up superclasses up to ProtoObject (for each theme!!) self benchLookup" | c t1 t2 t3 m result | c := UserInterfaceTheme current. m := UserInterfaceThemeTestObject new. t1 := UserInterfaceTheme new name: #benchmarkOne. t2 := UserInterfaceTheme new name: #benchmarkTwo. t3 := UserInterfaceTheme new name: #benchmarkThree. t3 set: #testColor for: ProtoObject to: Color white. t1 link: t2. t2 link: t3. t1 apply. result := OrderedCollection new. [ + 3 timesRepeat: [ + Smalltalk garbageCollect. + result add: [m getTestColor] bench]. - 3 timesRepeat: [result add: [m getTestColor] bench]. ] ensure: [c apply]. result explore.! |
Free forum by Nabble | Edit this page |