Skip to content

add RBCodeSnippetTest>>#testCodeImporter#12933

Merged
MarcusDenker merged 4 commits intopharo-project:Pharo12from
privat:improve-faulty-compilation-test-importer
Mar 16, 2023
Merged

add RBCodeSnippetTest>>#testCodeImporter#12933
MarcusDenker merged 4 commits intopharo-project:Pharo12from
privat:improve-faulty-compilation-test-importer

Conversation

@privat
Copy link
Contributor

@privat privat commented Mar 7, 2023

Extends RBCodeSnippetTest to test CodeImporter

CodeImporter is a client of OpalCompiler and might be confronted to faulty code.
This PR does not change the behavior of the importer (just add test). Therefore, compilation errors are expected to be produced on faulty code.
In classical use, such compilation errors are caught by the buggy SyntaxErrorDebugger. But the present test only check (and capture) the SyntaxErrorNotification signals, and does not check the recoverability. See #12910 for related rants.

The test is a little complex because there are basically two modes, one for expressions and one for methods, and we need a placeholder class and to retrieve the method in the latter.

Note: I do not know how much the CodeImporter is used in real life.

@privat
Copy link
Contributor Author

privat commented Mar 7, 2023

Errors seems related to #12935 . Merge this other one and rerun the tests

@MarcusDenker MarcusDenker reopened this Mar 8, 2023
@privat privat changed the base branch from Pharo11 to Pharo12 March 16, 2023 08:47
@privat
Copy link
Contributor Author

privat commented Mar 16, 2023

PR #12995 was merged and now the test are OK (except random windows weirdness)

@MarcusDenker MarcusDenker merged commit 1fc0f72 into pharo-project:Pharo12 Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants