Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix importation issue #174

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions src/EsopeImporter-Tests/EsopeFullGrammarTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
Class {
#name : 'EsopeFullGrammarTest',
#superclass : 'TestCase',
#name : #EsopeFullGrammarTest,
#superclass : #TestCase,
#instVars : [
'parser'
],
#category : 'EsopeImporter-Tests-Rewriter',
#package : 'EsopeImporter-Tests',
#tag : 'Rewriter'
#category : 'EsopeImporter-Tests-Rewriter'
}

{ #category : 'tests' }
{ #category : #tests }
EsopeFullGrammarTest class >> esopeBigFile [

^ ' subroutine vcstp(ov1,pshp1,pbeg1,pend1,ov2,status)
Expand Down Expand Up @@ -369,7 +367,7 @@ C -- terminer en echec
'
]

{ #category : 'tests' }
{ #category : #tests }
EsopeFullGrammarTest class >> esopeFileWithCallStatement [

^ ' subroutine valrma(
Expand Down Expand Up @@ -463,7 +461,7 @@ C -- terminer en echec
'
]

{ #category : 'tests' }
{ #category : #tests }
EsopeFullGrammarTest class >> esopeSmallFile [

^ ' subroutine stgbrk(
Expand Down Expand Up @@ -684,34 +682,34 @@ C
'
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> parserClass [

^ PPEsopeGrammar
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> setUp [

super setUp.
parser := self parserClass new
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testBigFile [

self deny:
(parser parse: self class esopeBigFile) isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEmptyFile [

self deny: (parser parse: '
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEsopePointeurFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -725,7 +723,7 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEsopeSegactFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -739,7 +737,7 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEsopeSegadjFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -754,7 +752,7 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEsopeSegdesFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -769,7 +767,7 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testEsopeSeginiFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -784,7 +782,7 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testNonEsopeFile [

self deny: (parser parse: ' subroutine stgbrk(
Expand All @@ -797,14 +795,14 @@ c == sorties ==
') isPetit2Failure
]

{ #category : 'running' }
{ #category : #running }
EsopeFullGrammarTest >> testSmallFile [

self deny:
(parser parse: self class esopeSmallFile) isPetit2Failure
]

{ #category : 'tests' }
{ #category : #tests }
EsopeFullGrammarTest >> testStart [

self deny:
Expand Down
60 changes: 29 additions & 31 deletions src/EsopeImporter-Tests/EsopeGrammarTest.class.st
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
Class {
#name : 'EsopeGrammarTest',
#superclass : 'PP2CompositeNodeTest',
#name : #EsopeGrammarTest,
#superclass : #PP2CompositeNodeTest,
#instVars : [
'sixSpaces'
],
#category : 'EsopeImporter-Tests-Rewriter',
#package : 'EsopeImporter-Tests',
#tag : 'Rewriter'
#category : 'EsopeImporter-Tests-Rewriter'
}

{ #category : 'accessing' }
{ #category : #accessing }
EsopeGrammarTest >> parserClass [
^ PPEsopeGrammar
]

{ #category : 'running' }
{ #category : #running }
EsopeGrammarTest >> setUp [

super setUp.
parser := self parserInstance.
sixSpaces := ' '.
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testCommentLine [

self
Expand All @@ -36,7 +34,7 @@ EsopeGrammarTest >> testCommentLine [
rule: #commentLine
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testEmptyLine [

self
Expand All @@ -45,7 +43,7 @@ EsopeGrammarTest >> testEmptyLine [
rule: #emptyLine
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testEndOfLine [

self parse: String cr rule: #endOfLine.
Expand All @@ -55,7 +53,7 @@ EsopeGrammarTest >> testEndOfLine [
self parse: String lf rule: #endOfLine
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testEndSegment [

| segment |
Expand All @@ -70,7 +68,7 @@ EsopeGrammarTest >> testEndSegment [
self fail: ' end segment,values' rule: #endSegment
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testFortranLine [

self
Expand All @@ -81,7 +79,7 @@ EsopeGrammarTest >> testFortranLine [
self parse: String cr rule: #fortranLine
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testFortranLineEmpty [

self
Expand All @@ -90,7 +88,7 @@ EsopeGrammarTest >> testFortranLineEmpty [
rule: #fortranLine
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testInclude [

self
Expand All @@ -108,7 +106,7 @@ EsopeGrammarTest >> testInclude [
rule: #include
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testIncludeDoubleQuote [


Expand All @@ -118,7 +116,7 @@ EsopeGrammarTest >> testIncludeDoubleQuote [
rule: #include.
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testIncludeMixed [


Expand All @@ -128,7 +126,7 @@ EsopeGrammarTest >> testIncludeMixed [
rule: #include.
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testIncludeNotDoubleQuote [


Expand All @@ -138,7 +136,7 @@ EsopeGrammarTest >> testIncludeNotDoubleQuote [
rule: #include.
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testLines [

| aLine |
Expand All @@ -151,7 +149,7 @@ EsopeGrammarTest >> testLines [
self parse: aLine , (sixSpaces , 'end' , String cr)
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testOptionalBlanks [

self parse: ' ' rule: #optionalBlanks.
Expand All @@ -160,7 +158,7 @@ EsopeGrammarTest >> testOptionalBlanks [
self parse: '' rule: #optionalBlanks
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testPointer [

self
Expand All @@ -170,7 +168,7 @@ EsopeGrammarTest >> testPointer [
self fail: 'pointeur splist.list' rule: #pointer
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testPointerExtraSpaces [

self
Expand All @@ -179,7 +177,7 @@ EsopeGrammarTest >> testPointerExtraSpaces [
rule: #pointer
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testPointers [

self
Expand All @@ -189,7 +187,7 @@ EsopeGrammarTest >> testPointers [
self fail: 'pointeur splist.list' rule: #pointer
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegact [

self parse: sixSpaces , 'segact,splist' , String cr rule: #segact.
Expand All @@ -198,7 +196,7 @@ EsopeGrammarTest >> testSegact [
self fail: 'segact,splist' , String cr rule: #segact
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegadj [

self
Expand All @@ -208,7 +206,7 @@ EsopeGrammarTest >> testSegadj [
self fail: 'segadj,alist' rule: #segadj
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegadjVcAcc226 [

self
Expand All @@ -218,7 +216,7 @@ EsopeGrammarTest >> testSegadjVcAcc226 [
self fail: 'segadj,pval' rule: #segadj
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegdes [

self
Expand All @@ -232,7 +230,7 @@ EsopeGrammarTest >> testSegdes [
self fail: 'segdes,alist' rule: #segdes
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegini [

self
Expand All @@ -242,7 +240,7 @@ EsopeGrammarTest >> testSegini [
self fail: 'segini,rlist' rule: #segini
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegment [

| segment |
Expand All @@ -265,7 +263,7 @@ EsopeGrammarTest >> testSegment [
self fail: ' segment,values' rule: #segment
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegmentSimpleWithMoreThanSixSpaces [

| segment |
Expand All @@ -277,7 +275,7 @@ EsopeGrammarTest >> testSegmentSimpleWithMoreThanSixSpaces [
self parse: segment
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegprt [

self
Expand All @@ -287,7 +285,7 @@ EsopeGrammarTest >> testSegprt [
self fail: 'segprt,rlist' rule: #segprt
]

{ #category : 'tests' }
{ #category : #tests }
EsopeGrammarTest >> testSegsup [

self
Expand Down
Loading
Loading