Skip to content

Commit

Permalink
Merge pull request #203 from moosetechnology/197-Importer-Missing-inf…
Browse files Browse the repository at this point in the history
…ormation-on-classenum-field-access

Created test exhibiting issue #197. Skipped for now to let CI pass
  • Loading branch information
NicolasAnquetil authored Nov 16, 2023
2 parents 13539c2 + 4ea8e72 commit 72b34ec
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Class {
#name : #JavaSmaCCReturnAttributeAccessTest,
#superclass : #JavaSmaCCImporterTest,
#category : #'FAST-Java-SmaCC-Importer-Tests'
}

{ #category : #accessing }
JavaSmaCCReturnAttributeAccessTest >> javaMethod [
^ 'void methodReturn() {
return a.b;
}'
]

{ #category : #tests }
JavaSmaCCReturnAttributeAccessTest >> testReturnStatementExpressionType [

self skip: 'need work, skipping to let CI pass'.

self
assert: (fastModel allWithType: FASTJavaReturnStatement) anyOne expression class
equals: FASTJavaQualifiedName
]

{ #category : #tests }
JavaSmaCCReturnAttributeAccessTest >> testReturnStatementNumber [
self assert: (fastModel allWithType: FASTJavaReturnStatement) size equals: 1
]
14 changes: 14 additions & 0 deletions src/FAST-Java-Tools-Tests/FASTJavaExportVisitorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ FASTJavaExportVisitorTest >> blockAST: sourceCode [

{ #category : #running }
FASTJavaExportVisitorTest >> export: aFASTJavaNode equals: aString [

self
assert: (FASTJavaExportVisitor new export: aFASTJavaNode)
equals: aString
Expand Down Expand Up @@ -92,6 +93,19 @@ FASTJavaExportVisitorTest >> testVisitFASTEmptyReturn [
'
]

{ #category : #tests }
FASTJavaExportVisitorTest >> testVisitFASTEmptyReturnAttributeAccess [

| ast |

self skip: 'need work, skipping to let CI pass'.

ast := self methodAST: 'void mth() { return a.b; }'.

self export: ast statements first equals: 'return a.b;
'
]

{ #category : #tests }
FASTJavaExportVisitorTest >> testVisitFASTJavaAnnotatedMethod [

Expand Down

0 comments on commit 72b34ec

Please sign in to comment.