-
Notifications
You must be signed in to change notification settings - Fork 65
/
VMLiterRulesTest.class.st
43 lines (37 loc) · 1.09 KB
/
VMLiterRulesTest.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Class {
#name : #VMLiterRulesTest,
#superclass : #TestCase,
#category : #VMMakerTests
}
{ #category : #tests }
VMLiterRulesTest >> testSlangRedundantTypeDeclaration [
| ast |
ast := self class compiler parse:
'testMethod <var:#aVar type: #aType>'.
self assert:
(ReSlangRedundantTypeDeclarationRule new basicCheck:
ast pragmas first).
ast := self class compiler parse:
'testMethod <var:#aVar declareC: #aDeclaration>'.
self assert:
(ReSlangRedundantTypeDeclarationRule new basicCheck:
ast pragmas first).
]
{ #category : #tests }
VMLiterRulesTest >> testSlangTypeDeclarationForArgument [
| ast |
ast := self class compiler parse:
'testMethod: anArg <var:#anArg declareC: #aDeclaration>'.
self deny:
(ReSlangRedundantTypeDeclarationRule new basicCheck:
ast pragmas first)
]
{ #category : #tests }
VMLiterRulesTest >> testSlangTypeDeclarationForVariable [
| ast |
ast := self class compiler parse:
'testMethod <var:#aVar declareC: #aDeclaration> | aVar |'.
self deny:
(ReSlangRedundantTypeDeclarationRule new basicCheck:
ast pragmas first)
]