@@ -21406,6 +21406,73 @@ FASTPythonImporterTest >> testSliceWithStep [
2140621406 self assert: (self topEntity isOfType: FASTPyIdentifier)
2140721407]
2140821408
21409+ { #category : 'tests - types' }
21410+ FASTPythonImporterTest >> testSplatType [
21411+ <generated>
21412+ "Generated as regression test by FASTPyImporterTestGenerator>>#generateTestNamed:fromCode:protocol:
21413+ Regenerate executing: self regenerateTest: #testSplatType "
21414+
21415+ self parse: 'def f(*items: *Ts): pass'.
21416+
21417+ self assert: (fast allWithType: FASTPyBlock) size equals: 1.
21418+ self assert: (fast allWithType: FASTPyFunctionDefinition) size equals: 1.
21419+ self assert: (fast allWithType: FASTPyListSplatParameter) size equals: 1.
21420+ self assert: (fast allWithType: FASTPyModule) size equals: 1.
21421+ self assert: (fast allWithType: FASTPyPassStatement) size equals: 1.
21422+ self assert: (fast allWithType: FASTPySplatType) size equals: 1.
21423+ self assert: (fast allWithType: FASTPyType) size equals: 1.
21424+
21425+ stack push: fast rootEntities anyOne containedEntities first.
21426+ self assert: self topEntity sourceCode equals: 'def f(*items: *Ts): pass'.
21427+ self assert: (self topEntity isOfType: FASTPyFunctionDefinition).
21428+ self assert: (self topEntity isOfType: FASTPyTDefinition).
21429+ self assert: (self topEntity isOfType: FASTTWithParameters).
21430+ self assert: (self topEntity isOfType: FASTTWithStatements).
21431+ self assert: self topEntity name equals: 'f'.
21432+
21433+ "Testing value of multivalued relation parameters"
21434+ self assert: self topEntity parameters size equals: 1.
21435+
21436+ stack push: (stack top parameters at: 1).
21437+ self assert: self topEntity sourceCode equals: '*items: *Ts'.
21438+ self assert: (self topEntity isOfType: FASTPyListSplatParameter).
21439+ self assert: (self topEntity isOfType: FASTTVariableEntity).
21440+ self assert: self topEntity name equals: 'items'.
21441+
21442+ "Testing value of monovalue relation type"
21443+ self assert: self topEntity type isNotNil.
21444+
21445+ stack push: self topEntity type.
21446+ self assert: self topEntity sourceCode equals: '*Ts'.
21447+ self assert: (self topEntity isOfType: FASTPyType).
21448+
21449+ "Testing value of monovalue relation content"
21450+ self assert: self topEntity content isNotNil.
21451+
21452+ stack push: self topEntity content.
21453+ self assert: self topEntity sourceCode equals: '*Ts'.
21454+ self assert: (self topEntity isOfType: FASTPySplatType).
21455+ self assert: self topEntity name equals: 'Ts'.
21456+ stack pop.
21457+ stack pop.
21458+ stack pop.
21459+
21460+ "Testing value of monovalue relation statementBlock"
21461+ self assert: self topEntity statementBlock isNotNil.
21462+
21463+ stack push: self topEntity statementBlock.
21464+ self assert: self topEntity sourceCode equals: 'pass'.
21465+ self assert: (self topEntity isOfType: FASTPyBlock).
21466+ self assert: (self topEntity isOfType: FASTTStatementBlock).
21467+
21468+ "Testing value of multivalued relation statements"
21469+ self assert: self topEntity statements size equals: 1.
21470+
21471+ stack push: (stack top statements at: 1).
21472+ self assert: self topEntity sourceCode equals: 'pass'.
21473+ self assert: (self topEntity isOfType: FASTPyPassStatement)
21474+ ]
21475+
2140921476{ #category : 'tests - literals' }
2141021477FASTPythonImporterTest >> testStringWithEscapedInterpolation [
2141121478 <generated>
0 commit comments