/
BIPragmaExpressionTest.class.st
41 lines (36 loc) · 1.17 KB
/
BIPragmaExpressionTest.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
Class {
#name : #BIPragmaExpressionTest,
#superclass : #BISingleExpressionTest,
#category : #'BlueInk-Tests-Base'
}
{ #category : #configuration }
BIPragmaExpressionTest >> basicConfiguration [
^ self contextClass basicNew
formatCommentWithStatements:false;
maxLineLength: 50;
keepBlockInMessage: true
]
{ #category : #tests }
BIPragmaExpressionTest >> testPragmaNoExtraSpace [
| expr source |
expr := RBParser parsePragma:'< Pragma >'.
configurationSelector := #basicConfiguration.
source := self formatter format: expr.
self assert: source equals: '<Pragma>'
]
{ #category : #tests }
BIPragmaExpressionTest >> testPragmaNoExtraSpace2 [
| expr source |
expr := RBParser parsePragma:'<func: ''(3+4)'' res: 7>'.
configurationSelector := #basicConfiguration.
source := self formatter format: expr.
self assert: source equals: '<func: ''(3+4)'' res: 7>'
]
{ #category : #tests }
BIPragmaExpressionTest >> testPragmaNoExtraSpaceBetweenMethodeAndArgument [
| expr source |
expr := RBParser parsePragma:'<primitive: 41>'.
configurationSelector := #basicConfiguration.
source := self formatter format: expr.
self assert: source equals: '<primitive: 41>'
]