RegressionTests__BecomeTests.st
author Jan Vrany <jan.vrany@labware.com>
Mon, 08 Mar 2021 11:25:35 +0000
branchjv
changeset 2594 e5f39c0a5bd6
parent 1567 e17701a073f9
permissions -rwxr-xr-x
Improve UTF8 read/write tests in `ChangeSetTests`
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 1412
diff changeset
     1
"{ Package: 'stx:goodies/regression' }"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
TestCase subclass:#BecomeTests
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:''
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
1155
b19f4a8bb53c category changes
Claus Gittinger <cg@exept.de>
parents: 681
diff changeset
     9
	category:'tests-Regression-RuntimeSystem'
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!BecomeTests methodsFor:'tests'!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    15
test01_become
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
    "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
    17
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    | a b c d |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    20
    a := c := '123' copy.
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    21
    b := d := 'cd' copy.
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    a become: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
        assert: a = 'cd';
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    27
        assert: b = '123';
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
        assert: c = 'cd';
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
    29
        assert: d = '123'.
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    33
     self new test01_become
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    36
    "Created: / 30-04-2016 / 09:39:09 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    39
test10_becomeForward
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    "Test the forward become."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    | a b c d |
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 := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    d := b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    a becomeForward: 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
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
        assert: a = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        assert: b = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
        assert: c = 'cd';
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
        assert: d = 'cd'.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    59
     self new test10_becomeForward
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    62
    "Created: / 30-04-2016 / 09:39:19 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    65
test11_becomeForwardDontCopyIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "Check that
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
        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
    68
        2. the receiver's identity hash is unchanged."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    | a b hb |
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 := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    hb := b identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    a becomeForward: b copyHash: false.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
        assert: a identityHash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
        assert: b identityHash = hb.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    83
     self new test11_becomeForwardDontCopyIdentityHash
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    86
    "Created: / 30-04-2016 / 09:39:30 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
    89
test12_becomeForwardHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    | a b c hb |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    a := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    hb := b hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    a becomeForward: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
        assert: a hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
        assert: b hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
        assert: c hash = hb.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   105
     self new test12_becomeForwardHash
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   108
    "Created: / 30-04-2016 / 09:39:38 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   111
test13_becomeForwardIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
    "Check that
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
            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
   114
            2. the receiver's identity hash is unchanged."
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    | a b ha |
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 := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    ha := a identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
    a becomeForward: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
        assert: a identityHash = ha;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
        assert: b identityHash = ha.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   130
     self new test13_becomeForwardIdentityHash
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   133
    "Created: / 30-04-2016 / 09:39:45 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   136
test50_becomeHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    | a b c d ha hb |
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
681
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   140
    a := c := 'ab' copy.
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   141
    b := d := 'cd' copy.
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   142
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
    ha := a hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    hb := b hash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
    a become: b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
    self 
680
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   149
        assert: a = 'cd';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   150
        assert: b = 'ab';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   151
        assert: c = 'cd';
2927f2508675 #testBecome
Stefan Vogel <sv@exept.de>
parents: 298
diff changeset
   152
        assert: d = 'ab';
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
        assert: a hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
        assert: b hash = ha;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
        assert: c hash = hb;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
        assert: d hash = ha.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   160
     self new test50_becomeHash
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   163
    "Created: / 30-04-2016 / 09:39:53 / cg"
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   166
test51_becomeIdentityHash
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    "Note. The identity hash of both objects seems to change after the become:"
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    | a b c d |
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 := 'ab' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    b := 'cd' copy.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    c := a.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
    d := b.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
    a become: 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
    self 
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
        assert: a identityHash = c identityHash;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
        assert: b identityHash = d identityHash;
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
        deny: a identityHash = b identityHash.
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    "
1411
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   184
     self new test51_becomeIdentityHash
298
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
4d81edefbca9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   187
    "Created: / 30-04-2016 / 09:40:02 / cg"
1412
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   188
!
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   189
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   190
test60_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   191
    | a b  |
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   192
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   193
    a := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   194
    b := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   195
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   196
    a add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   197
    ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   198
    b 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
    a add: 2.
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
    b 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
    a printString.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   205
    b printString.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   206
    self 
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   207
        assert: a size == 2;
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   208
        assert: b size == 2.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   209
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   210
    "
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   211
     self new test60_becomeArray
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
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   214
    "Created: / 30-04-2016 / 09:40:02 / cg"
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
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   217
test61_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   218
    | a b  |
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   219
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   220
    a := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   221
    b := Array new:0.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   222
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   223
    50 timesRepeat:[
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   224
        a add: 1.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   225
        ObjectMemory garbageCollect.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   226
        b 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
    ].        
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   229
    self 
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   230
        assert: a size == 50;
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   231
        assert: b size == 50.
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   232
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   233
    "
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   234
     self new test61_becomeArray
e3d230f00025 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 1411
diff changeset
   235
    "
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
! !
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
!BecomeTests class methodsFor:'documentation'!
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
version
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
    ^ '$Header$'
681
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   242
!
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   243
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   244
version_CVS
4b29eea4eb34 changed:
Stefan Vogel <sv@exept.de>
parents: 680
diff changeset
   245
    ^ '$Header$'
298
0511624b097a initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
! !
1155
b19f4a8bb53c category changes
Claus Gittinger <cg@exept.de>
parents: 681
diff changeset
   247