Chris Muller uploaded a new version of MorphicExtrasTests to project Squeak 4.6:
http://source.squeak.org/squeak46/MorphicExtrasTests-fbs.3.mcz ==================== Summary ==================== Name: MorphicExtrasTests-fbs.3 Author: fbs Time: 30 November 2013, 11:03:19.679 pm UUID: 1c039763-bc92-834c-943e-d96d8820cbd7 Ancestors: MorphicExtrasTests-fbs.2 Tests for MorphicExtras's selector mangling. ==================== Snapshot ==================== SystemOrganization addCategory: #'MorphicExtrasTests-Postscript Filters'! SystemOrganization addCategory: #'MorphicExtrasTests-Flaps'! TestCase subclass: #ByteEncoderTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtrasTests-Postscript Filters'! ----- Method: ByteEncoderTest>>testIntegerByteEncoded (in category 'testing') ----- testIntegerByteEncoded self assert: (ByteEncoder stream writeNumber: 2 base: 2; yourself) contents = '10'. self assert: (ByteEncoder stream writeNumber: 21 base: 3; yourself) contents = '210'. self assert: (ByteEncoder stream writeNumber: 228 base: 4; yourself) contents = '3210'. self assert: (ByteEncoder stream writeNumber: 2930 base: 5; yourself) contents = '43210'. self assert: (ByteEncoder stream writeNumber: 44790 base: 6; yourself) contents = '543210'. self assert: (ByteEncoder stream writeNumber: 800667 base: 7; yourself) contents = '6543210'. self assert: (ByteEncoder stream writeNumber: 16434824 base: 8; yourself) contents = '76543210'. self assert: (ByteEncoder stream writeNumber: 381367044 base: 9; yourself) contents = '876543210'. self assert: (ByteEncoder stream writeNumber: 9876543210 base: 10; yourself) contents = '9876543210'. self assert: (ByteEncoder stream writeNumber: 282458553905 base: 11; yourself) contents = 'A9876543210'. self assert: (ByteEncoder stream writeNumber: 8842413667692 base: 12; yourself) contents = 'BA9876543210'. self assert: (ByteEncoder stream writeNumber: 300771807240918 base: 13; yourself) contents = 'CBA9876543210'. self assert: (ByteEncoder stream writeNumber: 11046255305880158 base: 14; yourself) contents = 'DCBA9876543210'. self assert: (ByteEncoder stream writeNumber: 435659737878916215 base: 15; yourself) contents = 'EDCBA9876543210'. self assert: (ByteEncoder stream writeNumber: 18364758544493064720 base: 16; yourself) contents = 'FEDCBA9876543210'. self assert: (ByteEncoder stream writeNumber: -2 base: 2; yourself) contents = '-10'. self assert: (ByteEncoder stream writeNumber: -21 base: 3; yourself) contents = '-210'. self assert: (ByteEncoder stream writeNumber: -228 base: 4; yourself) contents = '-3210'. self assert: (ByteEncoder stream writeNumber: -2930 base: 5; yourself) contents = '-43210'. self assert: (ByteEncoder stream writeNumber: -44790 base: 6; yourself) contents = '-543210'. self assert: (ByteEncoder stream writeNumber: -800667 base: 7; yourself) contents = '-6543210'. self assert: (ByteEncoder stream writeNumber: -16434824 base: 8; yourself) contents = '-76543210'. self assert: (ByteEncoder stream writeNumber: -381367044 base: 9; yourself) contents = '-876543210'. self assert: (ByteEncoder stream writeNumber: -9876543210 base: 10; yourself) contents = '-9876543210'. self assert: (ByteEncoder stream writeNumber: -282458553905 base: 11; yourself) contents = '-A9876543210'. self assert: (ByteEncoder stream writeNumber: -8842413667692 base: 12; yourself) contents = '-BA9876543210'. self assert: (ByteEncoder stream writeNumber: -300771807240918 base: 13; yourself) contents = '-CBA9876543210'. self assert: (ByteEncoder stream writeNumber: -11046255305880158 base: 14; yourself) contents = '-DCBA9876543210'. self assert: (ByteEncoder stream writeNumber: -435659737878916215 base: 15; yourself) contents = '-EDCBA9876543210'. self assert: (ByteEncoder stream writeNumber: -18364758544493064720 base: 16; yourself) contents = '-FEDCBA9876543210'.! TestCase subclass: #FlapTabTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtrasTests-Flaps'! !FlapTabTests commentStamp: 'wiz 6/11/2007 17:58' prior: 0! A FlapTabTests is here to test infinite recursion bug when extent: message is sent to some flap tabs see http://bugs.squeak.org/view.php?id=6486 for report. Instance Variables We inherit cases which can be filled with morphs that need to be deleted at the end of the test. ! ----- Method: FlapTabTests>>testFlapTabRecusion (in category 'tests') ----- testFlapTabRecusion | a b tab | "Create a float close to 466.700581395349" a := 1.1 at: 1 put: 1081944885; at: 2 put: 2497074009; yourself. b := 105. self deny: a + b - a = b. tab := Flaps newFlapTitled: 'Test' onEdge: #top. tab left: a. self should: [tab extent: b asPoint] notTakeMoreThanMilliseconds: 10 ! TestCase subclass: #MorphicExtrasSymbolExtensionsTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtrasTests-Flaps'! ----- Method: MorphicExtrasSymbolExtensionsTest>>testAsSimpleSetterReturnsSetterSelector (in category 'as yet unclassified') ----- testAsSimpleSetterReturnsSetterSelector self assert: #foo: equals: #foo asSimpleSetter. "And it really is 'simple':" self assert: #foo:: equals: #foo: asSimpleSetter.! |
Free forum by Nabble | Edit this page |