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

[ARM] Fix phobos unit tests #1861

Merged
merged 1 commit into from
Jan 25, 2014
Merged

[ARM] Fix phobos unit tests #1861

merged 1 commit into from
Jan 25, 2014

Conversation

jpf91
Copy link
Contributor

@jpf91 jpf91 commented Jan 14, 2014

Changes to make the unit tests pass on ARM. Mostly reducing required precision for math tests,
adding replacements for tests which required 80 bit reals and so on.

Note: This is part of a set of changes which are required to get test suite & unit tests passing on ARM GDC. All necessary changes for GDC are here for reference:
https://github.com/jpf91/GDC/commits/arm-old

Once these pull requests are merged upstream I'll merge them into GDC as well.

@@ -5793,7 +5793,7 @@ template Largest(T...) if(T.length >= 1)

unittest
{
static assert(is(Largest!(uint, ubyte, ulong, real) == real));
static assert(is(Largest!(uint, ubyte, real) == real));
Copy link
Member

Choose a reason for hiding this comment

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

Maybe (ubyte, ushort, uint, real) == real ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the ushort type, but I think the values were intentionally not sorted by size?

@ibuclaw
Copy link
Member

ibuclaw commented Jan 14, 2014

Other than nits, LTGM.

@@ -2605,7 +2605,7 @@ unittest
assert(to!Float("123e+2") == Literal!Float(123e+2));
assert(to!Float("123e-2") == Literal!Float(123e-2));
assert(to!Float("123.") == Literal!Float(123.0));
assert(to!Float(".375") == Literal!Float(.375));
assert(to!Float(".125") == Literal!Float(.125));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails on ARM? I'd expect an exact conversion for all floating point sizes, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, that was a merge fail on my part. The unit test originally used 0.456 and that failed on ARM.
I then opened a pull request to change this to 0.375:
d44104e

But I somehow used 0.125 in the ARM port and it got merged into this change. Anyway, I'll remove this change.

@jpf91
Copy link
Contributor Author

jpf91 commented Jan 25, 2014

ping...
This is one of the last three pull requests for ARM so it'd be great if we could get this merged. If there's anything that needs to be changed don't hesitate to tell me ;-)

alexrp pushed a commit that referenced this pull request Jan 25, 2014
[ARM] Fix phobos unit tests
@alexrp alexrp merged commit 5b1aa8b into dlang:master Jan 25, 2014
@jpf91
Copy link
Contributor Author

jpf91 commented Jan 25, 2014

thanks!

@jpf91 jpf91 deleted the arm-3 branch January 25, 2014 16:42
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.

4 participants