RegressionTests__BecomeTests.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 18:53:03 +0200
changeset 2327 bf482d49aeaf
parent 1447 2351db93aa5b
child 1500 d406a10b2965
permissions -rw-r--r--
#QUALITY by exept class: RegressionTests::StringTests added: #test82c_expanding
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
     1
"{ Encoding: utf8 }"
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
     2
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
     3
"{ Package: 'stx:goodies/regression' }"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: RegressionTests }"
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
TestCase subclass:#BecomeTests
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
1155
b19f4a8bb53c category changes
Claus Gittinger <cg@exept.de>
parents: 681
diff changeset
    11
	category:'tests-Regression-RuntimeSystem'
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
!BecomeTests methodsFor:'tests'!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    17
test01_become
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    "Test the two way become. Note. we cannot use string literals for this test"
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
    | a b c d |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    22
    a := c := '123' copy.
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    23
    b := d := 'cd' copy.
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    a become: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
        assert: a = 'cd';
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    29
        assert: b = '123';
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
        assert: c = 'cd';
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    31
        assert: d = '123'.
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    35
     self new test01_become
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    37
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    38
    "Created: / 30-04-2016 / 09:39:09 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    41
test10_becomeForward
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    "Test the forward become."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    | a b c d |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    d := b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    a becomeForward: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
        assert: a = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
        assert: b = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
        assert: c = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
        assert: d = 'cd'.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    61
     self new test10_becomeForward
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    63
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    64
    "Created: / 30-04-2016 / 09:39:19 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    67
test11_becomeForwardDontCopyIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "Check that
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
        1. the argument to becomeForward: is NOT modified to have the receiver's identity hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
        2. the receiver's identity hash is unchanged."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    | a b hb |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    hb := b identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    a becomeForward: b copyHash: false.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
        assert: a identityHash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
        assert: b identityHash = hb.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    85
     self new test11_becomeForwardDontCopyIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    87
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    88
    "Created: / 30-04-2016 / 09:39:30 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    91
test12_becomeForwardHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    | a b c hb |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    hb := b hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    a becomeForward: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
        assert: a hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
        assert: b hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
        assert: c hash = hb.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   107
     self new test12_becomeForwardHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   109
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   110
    "Created: / 30-04-2016 / 09:39:38 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   113
test13_becomeForwardIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
    "Check that
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
            1. the argument to becomeForward: is modified to have the receiver's identity hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
            2. the receiver's identity hash is unchanged."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    | a b ha |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    ha := a identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    a becomeForward: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
        assert: a identityHash = ha;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
        assert: b identityHash = ha.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   132
     self new test13_becomeForwardIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   134
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   135
    "Created: / 30-04-2016 / 09:39:45 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   138
test50_becomeHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    | a b c d ha hb |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
681
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   142
    a := c := 'ab' copy.
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   143
    b := d := 'cd' copy.
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   144
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    ha := a hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    hb := b hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    a become: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    self 
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   151
        assert: a = 'cd';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   152
        assert: b = 'ab';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   153
        assert: c = 'cd';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   154
        assert: d = 'ab';
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
        assert: a hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
        assert: b hash = ha;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
        assert: c hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
        assert: d hash = ha.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   162
     self new test50_becomeHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   164
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   165
    "Created: / 30-04-2016 / 09:39:53 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   168
test51_becomeIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    "Note. The identity hash of both objects seems to change after the become:"
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
    | a b c d |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
    d := b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    a become: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
        assert: a identityHash = c identityHash;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
        assert: b identityHash = d identityHash;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
        deny: a identityHash = b identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   186
     self new test51_becomeIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   188
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   189
    "Created: / 30-04-2016 / 09:40:02 / cg"
1412
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   190
!
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   191
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   192
test60_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   193
    | a b  |
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   194
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   195
    a := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   196
    b := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   197
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   198
    a add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   199
    ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   200
    b add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   201
    ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   202
    a add: 2.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   203
    ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   204
    b add: 2.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   205
    ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   206
    a printString.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   207
    b printString.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   208
    self 
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   209
        assert: a size == 2;
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   210
        assert: b size == 2.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   211
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   212
    "
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   213
     self new test60_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   214
    "
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   215
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   216
    "Created: / 30-04-2016 / 09:40:02 / cg"
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   217
!
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   218
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   219
test61_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   220
    | a b  |
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   221
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   222
    a := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   223
    b := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   224
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   225
    50 timesRepeat:[
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   226
        a add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   227
        ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   228
        b add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   229
        ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   230
    ].        
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   231
    self 
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   232
        assert: a size == 50;
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   233
        assert: b size == 50.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   234
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   235
    "
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   236
     self new test61_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   237
    "
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
! !
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
!BecomeTests class methodsFor:'documentation'!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
version
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    ^ '$Header$'
681
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   244
!
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   245
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   246
version_CVS
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   247
    ^ '$Header$'
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
! !
1155
b19f4a8bb53c category changes
Claus Gittinger <cg@exept.de>
parents: 681
diff changeset
   249