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

Added test case for returning doubles #642

Closed

Conversation

BastiaanOlij
Copy link
Collaborator

Added a test case for an issue I'm looking into, just raising a draft PR to show the code, hopefully will change this into a fix once I know :)

The method I'm testing is really simple:

double Example::return_double(double p_a, double p_b) {
	return p_a + p_b;
}

Added two test cases:

prints("return 1 + 2 = ", $Example.return_double(1, 2))
prints("return 1.5 + 2.0 = ", $Example.return_double(1.5, 2.0))

The output currently is:

return 1 + 2 =  0
return 1.5 + 2.0 =  3.5

Originally I thought something was going wrong in returning the value as we were getting values in a and b but on close inspection those values are rubbish. The problem seems to be related to converting integer values to doubles..

@BastiaanOlij BastiaanOlij added the bug This has been identified as a bug label Oct 17, 2021
@BastiaanOlij BastiaanOlij self-assigned this Oct 17, 2021
@dsnopek
Copy link
Collaborator

dsnopek commented Aug 15, 2023

Superseded by #1209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived bug This has been identified as a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants