Skip to content

tests/lapi: add math tests #123

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

Merged
merged 1 commit into from
Jun 2, 2025
Merged

tests/lapi: add math tests #123

merged 1 commit into from
Jun 2, 2025

Conversation

ligurio
Copy link
Owner

@ligurio ligurio commented Mar 26, 2025

Depends on #121.

@ligurio ligurio force-pushed the ligurio/gh-xxxx-lapi-math branch from c832763 to 24fe535 Compare March 26, 2025 14:49
@ligurio ligurio force-pushed the ligurio/gh-xxxx-lapi-math branch 2 times, most recently from 2212660 to 90bacf6 Compare April 15, 2025 07:50
@ligurio ligurio force-pushed the ligurio/gh-xxxx-lapi-math branch 4 times, most recently from 23029a9 to 813ee32 Compare May 14, 2025 11:13
Copy link
Contributor

@Buristan Buristan left a comment

Choose a reason for hiding this comment

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

Hi, Sergey!
Thanks for the patch!
Generally LGTM, with a bunch of nits below.

@ligurio ligurio requested a review from Buristan May 27, 2025 08:41
@ligurio ligurio force-pushed the ligurio/gh-xxxx-lapi-math branch 3 times, most recently from 26aba7c to deb7be6 Compare May 30, 2025 10:37
Copy link
Contributor

@Buristan Buristan left a comment

Choose a reason for hiding this comment

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

Hi, Sergey!
Thanks for the fixes!
LGTM, with two comments below.

The patch adds a tests for Lua math standard unctions. Also, the
patch introduces a helper `lua_current_version_ge_than()` for
convenient versions comparisons and a helper `approx_equal()` for
convenient numbers comparisons.

Rules from trigonometric identities [1] has been used as
invariants for trigonometric functions.

1. https://en.wikipedia.org/wiki/List_of_trigonometric_identities
@ligurio ligurio force-pushed the ligurio/gh-xxxx-lapi-math branch from deb7be6 to add009c Compare June 1, 2025 17:38
@ligurio ligurio merged commit 2974b65 into master Jun 2, 2025
12 checks passed
@ligurio ligurio deleted the ligurio/gh-xxxx-lapi-math branch June 2, 2025 08:16
ligurio added a commit to ligurio/lua-c-api-corpus that referenced this pull request Jun 3, 2025
ligurio added a commit to ligurio/lua-c-api-corpus that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants