RegressionTests__CompilerTests2.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 24 Jun 2013 16:34:45 +0200
changeset 948 a28d3cfb7c43
parent 930 78e2acffdea6
child 988 cd49b35f671f
permissions -rw-r--r--
Added test from global variable access when compiling from within the workspace.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'exept:regression' }"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
TestCase subclass:#CompilerTests2
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
     6
	instanceVariableNames:'methods enabledJIT'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
     9
	category:'tests-Regression'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    13
!CompilerTests2 methodsFor:'private'!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    14
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    15
assertSendersMethodIsIdenticalTo: sendersMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    16
    "Do not assert here, pass down to have some immediate, possibly lazy contexts
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    17
     in between"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    18
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    19
    self assertSendersSendersMethodIsIdenticalTo: sendersMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    20
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    21
    "Created: / 25-04-2013 / 15:28:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    22
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    23
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    24
assertSendersSendersMethodIsIdenticalTo: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    25
    | ctx m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    26
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    27
    ctx := thisContext sender sender.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    28
    "/ Now, DO NOT USE Context>>method as it searches for the method
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    29
    "/ if it is not set!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    30
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    31
    m := ctx instVarAt: (Context instVarIndexFor: #method).
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    32
    self assert: m == thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    33
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    34
    "Created: / 25-04-2013 / 15:30:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    35
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    36
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    37
compile: source mode: mode
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    38
    "Compile given source and returns the new method.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    39
     The from the source is prepended the mode + underscore
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    40
     (i.e., foo -> stc_foo).
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    41
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    42
     If mode is:
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    43
       #stc....then the method is stc-compiled.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    44
       #jit....then the method is bytecode compiled and left
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    45
               to the jitter
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    46
       #bc.....them the method is bytecode compiled and marked
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    47
               as checked so JIT won't even try.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    48
    "
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    49
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    50
    | m |
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    51
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    52
    Class withoutUpdatingChangesDo:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    53
        mode == #stc ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    54
            ParserFlags withSTCCompilation:#always do:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    55
                m := self class compile: (mode, '_', source) classified: 'private - *dynamic*'.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    56
            ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    57
        ] ifFalse:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    58
            ParserFlags withSTCCompilation:#never do:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    59
                m := self class compile: (mode, '_', source) classified: 'private - *dynamic*'.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    60
                m checked: (mode == #bc)
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    61
            ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    62
        ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    63
    ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    64
    methods add: m.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    65
    ^m
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    66
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    67
    "Created: / 25-04-2013 / 15:18:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    68
!
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    69
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    70
currentLineNumber
900
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    71
    thisContext fixAllLineNumbers.
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    72
    ^thisContext sender lineNumber.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    73
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    74
    "Created: / 12-04-2013 / 21:20:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
900
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    75
    "Modified: / 13-04-2013 / 10:12:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    76
! !
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    77
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    78
!CompilerTests2 methodsFor:'private-mock methods'!
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    79
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    80
method_lineno_002
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    81
    1 factorial. ^self currentLineNumber
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    82
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    83
    "Created: / 12-04-2013 / 21:22:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    84
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    85
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    86
method_lineno_300
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    87
    "DO NOT MAKE THIS METHOD SHORTER, DO NOT REMOVE BLANK LINES!!!!!!"
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    88
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    89
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    90
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    91
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    92
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    93
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    94
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    95
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    96
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    97
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    98
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    99
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   100
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   101
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   102
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   103
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   104
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   105
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   106
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   107
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   108
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   109
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   110
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   111
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   112
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   113
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   114
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   115
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   116
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   117
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   118
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   119
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   120
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   121
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   122
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   123
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   124
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   125
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   126
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   127
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   128
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   129
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   130
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   131
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   132
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   133
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   134
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   135
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   136
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   137
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   138
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   139
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   140
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   141
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   142
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   143
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   144
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   145
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   146
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   147
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   148
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   149
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   150
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   151
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   152
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   153
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   154
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   155
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   156
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   157
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   158
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   159
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   160
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   161
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   162
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   163
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   164
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   165
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   166
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   167
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   168
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   169
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   170
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   171
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   172
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   173
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   174
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   175
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   176
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   177
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   178
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   179
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   180
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   181
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   182
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   183
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   184
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   185
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   186
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   187
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   188
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   189
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   190
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   191
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   192
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   193
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   194
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   195
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   196
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   197
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   198
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   199
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   200
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   201
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   202
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   203
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   204
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   205
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   206
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   207
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   208
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   209
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   210
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   211
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   212
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   213
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   214
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   215
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   216
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   217
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   218
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   219
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   220
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   221
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   222
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   223
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   224
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   225
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   226
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   227
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   228
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   229
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   230
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   231
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   232
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   233
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   234
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   235
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   236
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   237
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   238
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   239
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   240
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   241
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   242
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   243
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   244
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   245
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   246
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   247
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   248
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   249
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   250
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   251
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   252
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   253
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   254
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   255
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   256
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   257
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   258
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   259
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   260
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   261
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   262
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   263
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   264
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   265
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   266
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   267
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   268
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   269
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   270
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   271
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   272
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   273
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   274
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   275
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   276
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   277
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   278
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   279
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   280
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   281
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   282
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   283
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   284
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   285
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   286
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   287
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   288
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   289
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   290
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   291
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   292
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   293
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   294
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   295
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   296
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   297
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   298
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   299
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   300
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   301
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   302
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   303
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   304
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   305
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   306
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   307
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   308
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   309
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   310
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   311
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   312
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   313
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   314
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   315
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   316
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   317
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   318
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   319
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   320
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   321
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   322
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   323
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   324
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   325
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   326
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   327
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   328
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   329
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   330
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   331
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   332
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   333
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   334
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   335
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   336
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   337
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   338
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   339
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   340
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   341
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   342
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   343
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   344
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   345
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   346
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   347
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   348
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   349
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   350
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   351
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   352
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   353
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   354
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   355
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   356
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   357
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   358
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   359
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   360
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   361
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   362
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   363
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   364
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   365
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   366
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   367
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   368
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   369
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   370
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   371
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   372
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   373
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   374
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   375
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   376
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   377
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   378
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   379
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   380
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   381
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   382
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   383
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   384
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   385
    ^self currentLineNumber
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   386
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   387
    "Created: / 12-04-2013 / 21:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   388
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   389
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   390
method_methodslot_01: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   391
    self assertSendersMethodIsIdenticalTo: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   392
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   393
    "Created: / 25-04-2013 / 15:28:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   394
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   395
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   396
method_methodslot_02: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   397
     [ self assertSendersMethodIsIdenticalTo: thisMethod ]
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   398
        valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   399
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   400
    "Created: / 25-04-2013 / 15:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   401
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   402
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   403
method_methodslot_03: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   404
    "Deep block nesting...."
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   405
    [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   406
        [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   407
            [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   408
                [ 
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   409
                    self assertSendersMethodIsIdenticalTo: thisMethod 
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   410
                ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   411
            ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   412
        ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   413
    ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   414
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   415
    "Created: / 25-04-2013 / 15:38:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   416
! !
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   417
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   418
!CompilerTests2 methodsFor:'setup'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   419
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   420
setUp
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   421
    methods := Set new.
930
78e2acffdea6 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 929
diff changeset
   422
    enabledJIT := ObjectMemory justInTimeCompilation:true.
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   423
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   424
    "Created: / 25-04-2013 / 15:20:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   425
!
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   426
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   427
tearDown
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   428
    ObjectMemory justInTimeCompilation: enabledJIT.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   429
    Class withoutUpdatingChangesDo:[
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   430
        | classesToRemove |
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   431
        (Smalltalk at: #'exept_regression_testData_CompilerTests2') notNil ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   432
            (Smalltalk at: #'exept_regression_testData_CompilerTests2') classes do:[:e|
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   433
                e notNil ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   434
                    Smalltalk removeClass: e
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   435
                ].
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   436
            ].
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   437
        ].
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   438
        Smalltalk allClassesDo:[:cls|
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   439
            (#(
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   440
                'exept:regression/testData/CompilerTests2'
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   441
                "/Add more...
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   442
            ) includes: cls package) ifTrue:[
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   443
                Smalltalk removeClass: cls
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   444
            ]
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   445
        ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   446
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   447
        methods do:[:m|
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   448
            m mclass removeSelector: m selector.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   449
        ]
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   450
    ]
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   451
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   452
    "Created: / 26-10-2012 / 11:32:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   453
    "Modified: / 24-06-2013 / 14:12:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   454
! !
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   455
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   456
!CompilerTests2 methodsFor:'tests'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   457
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   458
test_01
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   459
    "JV@2012-10-26:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   460
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   461
     When a package is loaded from source using
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   462
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   463
        Smalltalk loadPackage:'...'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   464
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   465
     expression __EVALUATED FROM WORKSPACE__ AND a method from loaded class
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   466
     uses a class from the same package that is not yet loaded (i.e., it will
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   467
     be loaded later),
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   468
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   469
     then the compiler as of 2012-10-26 generates access to a workspace variable
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   470
     instead of access to a global
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   471
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   472
     This tests checks for this bug
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   473
    "
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   474
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   475
    | ws |
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   476
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   477
    "/ this test only works with a Display...
871
098316a54e40 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   478
    self skipIf:[Display isNil] description:'Test requires a Display'.
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   479
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   480
    "/First, make sure that package is not yet loaded...
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   481
    self
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   482
        assert: (Smalltalk at: #'exept_regression_testData_CompilerTests2') isNil
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   483
        description: 'Mock package already loaded'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   484
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   485
    ws := WorkspaceApplication new.
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   486
    ws selectedWorkspace
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   487
        autoDefineVariables: #workspace;
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   488
        contents: '(Smalltalk loadPackage: #''exept:regression/testData/CompilerTests2'')';
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   489
        selectAll;
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   490
        doIt.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   491
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   492
    self assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') new foo class
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   493
                    == (Smalltalk at: #'RegressionTests::CompilerTests2Mock2')
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   494
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   495
    "Created: / 26-10-2012 / 11:59:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   496
    "Modified: / 24-06-2013 / 15:30:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   497
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   498
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   499
test_02
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   500
    "JV@2012-10-26:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   501
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   502
     When a package is loaded from source using
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   503
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   504
	Smalltalk loadPackage:'...'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   505
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   506
     expression and a method from loaded class in namespace uses a class from the
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   507
     same package and same namespace, that is not yet loaded (i.e., it will be loaded
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   508
     later),
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   509
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   510
     then the compiler as of 2012-10-26 generates access to class in no namespace.
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   511
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   512
     This test checks for this bug
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   513
    "
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   514
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   515
    "/First, make sure that package is not yet loaded...
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   516
    self
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   517
	assert: (Smalltalk at: #'exept_regression_estData_CompilerTests2') isNil
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   518
	description: 'Mock package already loaded'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   519
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   520
    self
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   521
	assert: (Smalltalk loadPackage: #'exept:regression/testData/CompilerTests2')
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   522
	description: 'Cannot load mock package!!'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   523
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   524
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   525
    self assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') new foo class
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   526
		    == (Smalltalk at: #'RegressionTests::CompilerTests2Mock2')
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   527
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   528
    "Created: / 26-10-2012 / 12:26:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   529
    "Modified (comment): / 12-02-2013 / 16:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   530
!
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   531
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   532
test_03
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   533
    "JV@2012-10-26:
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   534
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   535
     When a method is compiled programmaticallu from
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   536
     __FROM WORKSPACE__ AND a method uses a class that is not yet loaded,
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   537
     then the compiler as of 2013-06-24 generates access to a workspace variable
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   538
     instead of access to a global
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   539
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   540
     This tests checks for this bug
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   541
    "
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   542
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   543
    | ws m1 m2 |
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   544
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   545
    "/ this test only works with a Display...
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   546
    self skipIf:[Display isNil] description:'Test requires a Display'.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   547
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   548
    "/First, make sure that package is not yet loaded...
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   549
    self
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   550
        assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') isNil
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   551
        description: 'RegressionTests::CompilerTests2Mock1 already loaded'.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   552
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   553
    Smalltalk fileIn:'RegressionTests__CompilerTests2Mock1.st' inPackage:#'exept:regression/testData/CompilerTests2'.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   554
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   555
    self
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   556
        assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') notNil
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   557
        description: 'RegressionTests::CompilerTests2Mock1 failed to load'.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   558
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   559
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   560
    ws := WorkspaceApplication new.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   561
    ws selectedWorkspace 
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   562
        autoDefineVariables: #workspace;
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   563
        contents: 'RegressionTests::CompilerTests2Mock1 recompile';
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   564
        selectAll;
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   565
        doIt.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   566
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   567
    m1 := (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') compiledMethodAt: #foo.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   568
    m2 := (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') compiledMethodAt: #bar.
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   569
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   570
    self assert: (m1 literals allSatisfy:[:e|e class ~~ ValueHolder]).
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   571
    self assert: (m2 literals allSatisfy:[:e|e class ~~ ValueHolder]).
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   572
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   573
    "Created: / 24-06-2013 / 14:06:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   574
    "Modified (comment): / 24-06-2013 / 15:33:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   575
! !
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   576
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   577
!CompilerTests2 methodsFor:'tests - line numbers'!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   578
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   579
test_lineno_01_bci
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   580
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   581
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   582
    m002 := self compile: (self class >> #method_lineno_002) source mode: #bc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   583
    m300 := self compile: (self class >> #method_lineno_300) source mode: #bc.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   584
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   585
    self assert: (l := self bc_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   586
    self assert: (l := self bc_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   587
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   588
    self assert: m002 code isNil.
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   589
    self assert: m300 code isNil.
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   590
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   591
    "Created: / 12-04-2013 / 21:24:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   592
    "Modified: / 25-04-2013 / 15:24:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   593
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   594
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   595
test_lineno_01_jit
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   596
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   597
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   598
    m002 := self compile: (self class >> #method_lineno_002) source mode: #jit.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   599
    m300 := self compile: (self class >> #method_lineno_300) source mode: #jit.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   600
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   601
    self assert: (l := self jit_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   602
    self assert: (l := self jit_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   603
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
   604
    self assert: m002 code notNil.
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
   605
    self assert: m300 code notNil.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   606
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   607
    "Created: / 12-04-2013 / 21:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
   608
    "Modified: / 10-05-2013 / 18:23:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   609
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   610
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   611
test_lineno_01_stc
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   612
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   613
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   614
    m002 := self class >> #method_lineno_002.
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   615
    m300 := self class >> #method_lineno_300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   616
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   617
    self compile: m002 source mode: #stc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   618
    self compile: m300 source mode: #stc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   619
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   620
    self assert: (l := self stc_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   621
    self assert: (l := self stc_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   622
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   623
    "Created: / 12-04-2013 / 21:50:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   624
    "Modified: / 25-04-2013 / 15:22:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   625
! !
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   626
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   627
!CompilerTests2 methodsFor:'tests - method slot'!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   628
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   629
test_methodslot_01_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   630
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   631
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   632
    m := self compile: (self class >> #method_methodslot_01:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   633
    self bc_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   634
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   635
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   636
    "Created: / 25-04-2013 / 15:33:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   637
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   638
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   639
test_methodslot_01_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   640
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   641
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   642
    m := self compile: (self class >> #method_methodslot_01:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   643
    self jit_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   644
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   645
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   646
    "Created: / 25-04-2013 / 15:34:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   647
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   648
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   649
test_methodslot_01_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   650
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   651
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   652
    m := self compile: (self class >> #method_methodslot_01:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   653
    self stc_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   654
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   655
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   656
    "Created: / 25-04-2013 / 15:34:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   657
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   658
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   659
test_methodslot_02_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   660
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   661
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   662
    m := self compile: (self class >> #method_methodslot_02:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   663
    self bc_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   664
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   665
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   666
    "Created: / 25-04-2013 / 15:36:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   667
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   668
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   669
test_methodslot_02_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   670
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   671
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   672
    m := self compile: (self class >> #method_methodslot_02:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   673
    self jit_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   674
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   675
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   676
    "Created: / 25-04-2013 / 15:37:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   677
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   678
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   679
test_methodslot_02_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   680
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   681
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   682
    m := self compile: (self class >> #method_methodslot_02:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   683
    self stc_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   684
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   685
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   686
    "Created: / 25-04-2013 / 15:37:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   687
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   688
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   689
test_methodslot_03_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   690
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   691
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   692
    m := self compile: (self class >> #method_methodslot_03:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   693
    self bc_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   694
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   695
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   696
    "Created: / 25-04-2013 / 15:39:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   697
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   698
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   699
test_methodslot_03_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   700
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   701
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   702
    m := self compile: (self class >> #method_methodslot_03:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   703
    self jit_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   704
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   705
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   706
    "Created: / 25-04-2013 / 15:39:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   707
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   708
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   709
test_methodslot_03_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   710
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   711
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   712
    m := self compile: (self class >> #method_methodslot_03:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   713
    self stc_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   714
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   715
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   716
    "Created: / 25-04-2013 / 15:39:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   717
! !
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   718
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   719
!CompilerTests2 class methodsFor:'documentation'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   720
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   721
version
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   722
    ^ '$Header$'
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   723
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   724
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   725
version_CVS
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   726
    ^ '$Header$'
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   727
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   728
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   729
version_SVN
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
   730
    ^ '$Id$'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   731
! !
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   732