Skip to content

Unity framework : add float support in error print #5469

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
Dec 12, 2017

Conversation

jeromecoutant
Copy link
Collaborator

Description

It is useful to get some information about FAIL tests.

This define adds the float support in the error prints

Ex before:
[1510238846.92][CONN][RXD] :316::FAIL: Values Not Within Delta

With the patch:
[1510238777.90][CONN][RXD] :316::FAIL: Expected 1.000000 Was 0.999424

Thx

Status

READY

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 9, 2017

Just for info, Is there any size increase with this enablement?

@jeromecoutant
Copy link
Collaborator Author

You're right:

before:
features\frameworks\unity\source\unity.o | 1613
Total Flash memory (text + data): 55565 bytes

after:
features\frameworks\unity\source\unity.o | 1769
Total Flash memory (text + data): 56015 bytes

@0xc0170 0xc0170 requested a review from pan- November 10, 2017 08:47
@pan-
Copy link
Member

pan- commented Nov 10, 2017

Is it necessary to support double precision ? UNITY_FLOAT_VERBOSE wasn't enough ?

@jeromecoutant
Copy link
Collaborator Author

jeromecoutant commented Nov 10, 2017

I agree, UNITY_FLOAT_VERBOSE is enough

But we save only 8 bytes:
features\frameworks\unity\source\unity.o | 1761

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 16, 2017

I agree, UNITY_FLOAT_VERBOSE is enough

shall we change it ?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 22, 2017

Is it necessary to support double precision ? UNITY_FLOAT_VERBOSE wasn't enough ?

@jeromecoutant What is your opinion for this? Does this need an update?

@jeromecoutant
Copy link
Collaborator Author

Update done

Thx

@0xc0170 0xc0170 requested a review from adbridge November 30, 2017 17:47
Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

From the Unity help:

define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)

So this change looks good to me

@adbridge
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 30, 2017

Build : SUCCESS

Build number : 632
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5469/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Nov 30, 2017

@mbed-ci
Copy link

mbed-ci commented Nov 30, 2017

@0xc0170 0xc0170 merged commit ef44e4b into ARMmbed:master Dec 12, 2017
@jeromecoutant jeromecoutant deleted the PR_UNITY branch December 13, 2017 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants