diff options
Diffstat (limited to 'poky/meta/lib/oeqa/files')
-rw-r--r-- | poky/meta/lib/oeqa/files/test.c | 26 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/files/test.cpp | 3 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/files/test.pl | 2 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/files/test.py | 6 |
4 files changed, 37 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/files/test.c b/poky/meta/lib/oeqa/files/test.c new file mode 100644 index 0000000000..2d8389c92e --- /dev/null +++ b/poky/meta/lib/oeqa/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; +} diff --git a/poky/meta/lib/oeqa/files/test.cpp b/poky/meta/lib/oeqa/files/test.cpp new file mode 100644 index 0000000000..9e1a76473d --- /dev/null +++ b/poky/meta/lib/oeqa/files/test.cpp @@ -0,0 +1,3 @@ +#include <limits> + +int main() {}
\ No newline at end of file diff --git a/poky/meta/lib/oeqa/files/test.pl b/poky/meta/lib/oeqa/files/test.pl new file mode 100644 index 0000000000..689c8f1635 --- /dev/null +++ b/poky/meta/lib/oeqa/files/test.pl @@ -0,0 +1,2 @@ +$a = 9.01e+21 - 9.01e+21 + 0.01; +print ("the value of a is ", $a, "\n"); diff --git a/poky/meta/lib/oeqa/files/test.py b/poky/meta/lib/oeqa/files/test.py new file mode 100644 index 0000000000..f389225d72 --- /dev/null +++ b/poky/meta/lib/oeqa/files/test.py @@ -0,0 +1,6 @@ +import os + +os.system('touch /tmp/testfile.python') + +a = 9.01e+21 - 9.01e+21 + 0.01 +print("the value of a is %s" % a) |