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

Add the hello module as a test case #4739

Merged
merged 1 commit into from
Apr 26, 2021
Merged

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Apr 15, 2021

When developing a JIT, or a new implementation of Erlang, or a
new compiler for Erlang, one usually writes multiple small test cases
to use during development. Usually all that testing code is discarded
afterwards.

To avoid having to come up with those tests from scratch the next time
such a task is attempted, this commit adds a hello module that tests
most constructs that an Erlang implemenation needs to handle. To ensure
that it keeps working, we will embed it into a test suite for the
ERTS application.

@bjorng bjorng added team:VM Assigned to OTP team VM enhancement testing currently being tested, tag is used by OTP internal CI labels Apr 15, 2021
@bjorng bjorng self-assigned this Apr 15, 2021
ok.

test_catches() ->
thrown = (catch do_throw(id(thrown))),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure you know this so feel free to ignore me, but after #4736 gets merged you can drop the parentheses (4 instances of this in the file).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the parentheses. (#4736 is not needed because it fixes pretty-printing and documentation, while the actual change to erl_parse was done in a previous commit.)

@bjorng bjorng added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Apr 15, 2021
When developing a JIT, or a new implementation of Erlang, or a
new compiler for Erlang, one usually writes multiple small test cases
to use during development. Usually all that testing code is discarded
afterwards.

To avoid having to come up with those tests from scratch the next time
such a task is attempted, this commit adds a `hello` module that tests
most constructs that an Erlang implemenation needs to handle. To ensure
that it keeps working, we will embed it into a test suite for the
ERTS application.
@bjorng bjorng added the testing currently being tested, tag is used by OTP internal CI label Apr 23, 2021
@bjorng bjorng merged commit 4c2b8f3 into erlang:master Apr 26, 2021
@bjorng bjorng deleted the bjorn/erts/hello branch April 26, 2021 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants