diff options
Diffstat (limited to 'tests/basic-types/floats-hexadecimal.c-expected')
-rw-r--r-- | tests/basic-types/floats-hexadecimal.c-expected | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/basic-types/floats-hexadecimal.c-expected b/tests/basic-types/floats-hexadecimal.c-expected new file mode 100644 index 000000000..5e6f5d96b --- /dev/null +++ b/tests/basic-types/floats-hexadecimal.c-expected @@ -0,0 +1,73 @@ +/* basic_types_floats_hexadecimal.c generated by valac, the Vala compiler + * generated from basic_types_floats_hexadecimal.vala, do not modify */ + +#include <glib.h> +#include <float.h> +#include <math.h> + +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +static void _vala_main (void); + +static void +_vala_main (void) +{ + { + gfloat foo = 0.0F; + gfloat bar = 0.0F; + foo = 0x1.fP1F; + _vala_assert (foo == 3.875f, "foo == 3.875f"); + bar = 0xab.cdp2f; + _vala_assert (bar == 687.203125f, "bar == 687.203125f"); + } + { + gdouble foo = 0.0; + gdouble bar = 0.0; + gboolean _tmp0_ = FALSE; + foo = 0xf.ap3; + _vala_assert (foo == 125.0, "foo == 125.0"); + bar = 0xdead.beefp5; + if (bar > 1824183.866699) { + _tmp0_ = bar < 1824183.8666993; + } else { + _tmp0_ = FALSE; + } + _vala_assert (_tmp0_, "bar > 1824183.866699 && bar < 1824183.8666993"); + } + { + gdouble foo = 0.0; + gboolean _tmp1_ = FALSE; + gdouble bar = 0.0; + foo = 0x2022.1209p4; + if (foo > 131617.127197) { + _tmp1_ = foo < 131617.127198; + } else { + _tmp1_ = FALSE; + } + _vala_assert (_tmp1_, "foo > 131617.127197 && foo < 131617.127198"); + bar = 0x47.11p9; + _vala_assert (bar == 36386.0, "bar == 36386.0"); + } + { + gdouble foo = 0.0; + foo = 0x0.8P1; + _vala_assert (foo == 1.0, "foo == 1.0"); + } + { + gdouble foo = 0.0; + foo = 0xab.cdp20; + _vala_assert (foo == 180146176.0, "foo == 180146176.0"); + } +} + +int +main (int argc, + char ** argv) +{ + _vala_main (); + return 0; +} + |