compiler/tests/extras/PPCLRPCompiledParserSmokeTest.st
changeset 537 fb212e14d1f4
parent 535 a8feb0f47574
child 538 16e8536f5cfb
equal deleted inserted replaced
536:548996aca274 537:fb212e14d1f4
    40 compiledParserClassName
    40 compiledParserClassName
    41     "Return the name of the compiled parser"
    41     "Return the name of the compiled parser"
    42 
    42 
    43     ^ (self petitParserClass name , 'C_' , 
    43     ^ (self petitParserClass name , 'C_' , 
    44             "This is bit hacky!!"
    44             "This is bit hacky!!"
    45             ((self compilerConfiguration options tokenize) ifTrue:[ 'Tokenizing' ] ifFalse:[ 'Universal' ])) asSymbol
    45             (("This is bit hacky!!" self compiler options tokenize) ifTrue:[ 'Tokenizing' ] ifFalse:[ 'Universal' ])) asSymbol
    46 
    46 
    47     "Created: / 29-07-2015 / 16:54:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    47     "Created: / 29-07-2015 / 16:54:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    48     "Modified: / 04-09-2015 / 15:44:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    48     "Modified: / 04-09-2015 / 15:44:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    49 !
    49 !
    50 
    50 
    51 compilerConfiguration
    51 compiler
    52     "Return configuration to use when compiling parser (as instance of PPCConfiguration)"
    52     "Return compiler to use when compiling parser (as instance of PPCConfiguration)"
    53 
    53     
    54     ^ self subclassResponsibility
    54     ^ self subclassResponsibility
    55 
    55 
    56     "Created: / 29-07-2015 / 16:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    56     "Created: / 29-07-2015 / 16:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    57 !
    57 !
    58 
    58 
    81 
    81 
    82 !PPCLRPCompiledParserSmokeTest methodsFor:'setup & teardown'!
    82 !PPCLRPCompiledParserSmokeTest methodsFor:'setup & teardown'!
    83 
    83 
    84 setUpBefore
    84 setUpBefore
    85     "Called before any of my tests is run (when resources are set up)"
    85     "Called before any of my tests is run (when resources are set up)"
    86     | time configuration |
    86     | time compiler |
    87 
    87 
    88     configuration := self compilerConfiguration.
    88     compiler := self compiler.
    89     configuration options parserName: self compiledParserClassName.
    89     compiler options parserName: self compiledParserClassName.
    90     time := Time millisecondsToRun: [
    90     time := Time millisecondsToRun: [
    91         self petitParser compileWithConfiguration: configuration.
    91         self petitParser compileUsingCompiler:compiler.
    92     ].
    92     ].
    93     Transcript show: self petitParserClass name ; show:' compiled in: '; show: time asString; show: 'ms'; cr.
    93     Transcript show: self petitParserClass name ; show:' compiled in: '; show: time asString; show: 'ms'; cr.
    94 
    94 
    95     "Created: / 29-07-2015 / 16:29:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    95     "Created: / 29-07-2015 / 16:29:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    96     "Modified: / 29-07-2015 / 18:40:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    96     "Modified: / 29-07-2015 / 18:40:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"