equal
deleted
inserted
replaced
|
1 "{ Package: 'stx:goodies/petitparser/compiler/tests' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 TestCase subclass:#PPCTokenGuardTest |
|
6 instanceVariableNames:'guard compiler node tokenNode' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'PetitCompiler-Tests-Guards' |
|
10 ! |
|
11 |
|
12 !PPCTokenGuardTest methodsFor:'as yet unclassified'! |
|
13 |
|
14 setUp |
|
15 super setUp. |
|
16 compiler := PPCMockCompiler new. |
|
17 ! |
|
18 |
|
19 testMakesSense |
|
20 tokenNode := PPCTokenNode new |
|
21 child: 'foo' asParser asCompilerTree. |
|
22 node := PPCPlusNode new |
|
23 child: tokenNode; |
|
24 yourself. |
|
25 guard := PPCTokenGuard on: node. |
|
26 |
|
27 self assert: guard makesSense. |
|
28 ! |
|
29 |
|
30 testMakesSense2 |
|
31 node := PPCPlusNode new |
|
32 child: ('foo' asParser asCompilerTree); |
|
33 yourself. |
|
34 guard := PPCTokenGuard on: node. |
|
35 |
|
36 self assert: guard makesSense not. |
|
37 ! ! |
|
38 |