From 93067ca089ea570e4e2bdfc456958c81a4d1e092 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 26 Aug 2016 19:23:42 +0300 Subject: Address comments and add requested tests --- src/rt/rust_test_helpers.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/rt') diff --git a/src/rt/rust_test_helpers.c b/src/rt/rust_test_helpers.c index d2ebdcca80c..7a04d377608 100644 --- a/src/rt/rust_test_helpers.c +++ b/src/rt/rust_test_helpers.c @@ -247,3 +247,24 @@ double rust_interesting_average(uint64_t n, ...) { int32_t rust_int8_to_int32(int8_t x) { return (int32_t)x; } + +typedef union LARGE_INTEGER { + struct { + uint32_t LowPart; + uint32_t HighPart; + }; + struct { + uint32_t LowPart; + uint32_t HighPart; + } u; + uint64_t QuadPart; +} LARGE_INTEGER; + +LARGE_INTEGER increment_all_parts(LARGE_INTEGER li) { + li.LowPart += 1; + li.HighPart += 1; + li.u.LowPart += 1; + li.u.HighPart += 1; + li.QuadPart += 1; + return li; +} -- cgit 1.4.1-3-g733a5