From ccbce75335971abf5098a492755e92ca60cf67bd Mon Sep 17 00:00:00 2001 From: Stefan Stanacar Date: Fri, 28 Jun 2013 11:55:50 +0300 Subject: lib/oeqa/runtime: add gcc test gcc compile test and support files. Signed-off-by: Stefan Stanacar --- meta/lib/oeqa/runtime/files/test.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta/lib/oeqa/runtime/files/test.c (limited to 'meta/lib/oeqa/runtime/files/test.c') diff --git a/meta/lib/oeqa/runtime/files/test.c b/meta/lib/oeqa/runtime/files/test.c new file mode 100644 index 0000000000..2d8389c92e --- /dev/null +++ b/meta/lib/oeqa/runtime/files/test.c @@ -0,0 +1,26 @@ +#include +#include +#include + +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; +} -- cgit v1.2.3