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

test(runtime-core) Test polymorphic host functions with more types #1270

Merged

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Mar 5, 2020

Partially extracted from #1018.

I was testing the new polymorphic host function API and noticed that Value::F32 and Value::F64 returns random values.

When running cd lib/runtime-core-tests; cargo test -- test_closure_dynamic_3, you will see random values for k (which is a f32):

One run:

[lib/runtime-core-tests/tests/imports.rs:239] i = 1
[lib/runtime-core-tests/tests/imports.rs:240] j = 2
[lib/runtime-core-tests/tests/imports.rs:241] k = 0.00000000000000000000000000000000000050528894

Another run:

[lib/runtime-core-tests/tests/imports.rs:239] i = 1
[lib/runtime-core-tests/tests/imports.rs:240] j = 2
[lib/runtime-core-tests/tests/imports.rs:241] k = 0.000000000000000000000000000000037134995

@Hywan Hywan added bug Something isn't working 📦 lib-deprecated About the deprecated crates labels Mar 5, 2020
@Hywan Hywan requested a review from losfair March 5, 2020 13:20
Comment on lines +239 to +241
dbg!(i);
dbg!(j);
dbg!(k);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is where the outputs of the PR's description come from.

@losfair
Copy link
Contributor

losfair commented Mar 5, 2020

#1271 will fix this.

@bors bors bot merged commit fc114ac into wasmerio:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-deprecated About the deprecated crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants