diff options
| author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
| commit | c124f4f2e04dca16a428a76c89677328bc7bf908 (patch) | |
| tree | cc1bfbbced5244130a102cdd63c72584b1d6e408 /meta/lib/oeqa/runtime/files/test.c | |
| download | blackbird-openbmc-c124f4f2e04dca16a428a76c89677328bc7bf908.tar.gz blackbird-openbmc-c124f4f2e04dca16a428a76c89677328bc7bf908.zip | |
Squashed 'yocto-poky/' content from commit ea562de
git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
Diffstat (limited to 'meta/lib/oeqa/runtime/files/test.c')
| -rw-r--r-- | meta/lib/oeqa/runtime/files/test.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/files/test.c b/meta/lib/oeqa/runtime/files/test.c new file mode 100644 index 000000000..2d8389c92 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/test.c @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <math.h> +#include <stdlib.h> + +double convert(long long l) +{ + return (double)l; +} + +int main(int argc, char * argv[]) { + + long long l = 10; + double f; + double check = 10.0; + + f = convert(l); + printf("convert: %lld => %f\n", l, f); + if ( f != check ) exit(1); + + f = 1234.67; + check = 1234.0; + printf("floorf(%f) = %f\n", f, floorf(f)); + if ( floorf(f) != check) exit(1); + + return 0; +} |

