<div dir="ltr"><div>Resolved the trailing whitespace issue in this patch.<br></div><div>can you please check :) <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 8, 2020 at 1:58 AM Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
testsuites/psxtests/psxinttypes01/init.c | 26 +++++++++++++++++--<br>
.../psxtests/psxinttypes01/psxinttypes01.doc | 10 ++++++-<br>
2 files changed, 33 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/testsuites/psxtests/psxinttypes01/init.c b/testsuites/psxtests/psxinttypes01/init.c<br>
index 030aa2aa57..376bdbcc0c 100644<br>
--- a/testsuites/psxtests/psxinttypes01/init.c<br>
+++ b/testsuites/psxtests/psxinttypes01/init.c<br>
@@ -6,6 +6,7 @@<br>
/*<br>
* SPDX-License-Identifier: BSD-2-Clause<br>
*<br>
+ * Copyright (C) 2020, Eshan Dhawan<br>
* Copyright (C) 2019, Aditya Upadhyay and Vaibhav Gupta<br>
*<br>
* Redistribution and use in source and binary forms, with or without<br>
@@ -64,11 +65,32 @@ rtems_task Init(rtems_task_argument ignored)<br>
wchar_t *nptr2_n_errange = L"-9999999999999999999999";<br>
wchar_t *endptr2 = NULL;<br>
<br>
- intmax_t result_strtoimax;<br>
+ intmax_t result_strtoimax, result_imaxabs, input_1, input_2;<br>
+ imaxdiv_t result_exp, result_imaxdiv;<br>
uintmax_t result_strtoumax;<br>
<br>
TEST_BEGIN();<br>
-<br>
+<br>
+ /* Test for imaxabs */<br>
+ input_1 = -10;<br>
+ result_imaxabs = 10;<br>
+ rtems_test_assert( imaxabs(input_1) == result_imaxabs );<br>
+<br>
+ input_1 = 10;<br>
+ result_imaxabs = 10;<br>
+ rtems_test_assert( imaxabs(input_1) == result_imaxabs );<br>
+<br>
+ /* Test for imaxdiv */<br>
+ input_1 = 10;<br>
+ input_2 = 3;<br>
+ result_exp.quot = input_1 / input_2;<br>
+ result_exp.rem = input_1 % input_2;<br>
+ result_imaxdiv = imaxdiv( input_1, input_2 );<br>
+ rtems_test_assert(<br>
+ result_imaxdiv.quot == result_exp.quot &&<br>
+ result_imaxdiv.rem == result_exp.rem<br>
+ );<br>
+<br>
/* Test for strtoimax */<br>
puts( "\nstrtoimax Testcases...." );<br>
puts( "Valid Inputs - Positive Number" );<br>
diff --git a/testsuites/psxtests/psxinttypes01/psxinttypes01.doc b/testsuites/psxtests/psxinttypes01/psxinttypes01.doc<br>
index 19f63af34b..2e30906131 100644<br>
--- a/testsuites/psxtests/psxinttypes01/psxinttypes01.doc<br>
+++ b/testsuites/psxtests/psxinttypes01/psxinttypes01.doc<br>
@@ -1,4 +1,4 @@<br>
-This File describes the concepts tested by this test suite.<br>
+This File describes the concepts tested by this test suite.<br>
<br>
inttypes.h - fixed size integer types<br>
<br>
@@ -37,3 +37,11 @@ test suite name: PSXINTTYPE 01<br>
- checks for output for string having a negative number - Number Out of Range<br>
- checks for final string pointed by endptr<br>
- checks for output for invalid argument - Invalid Base<br>
+<br>
+- Checks for imaxabs Testcases<br>
+ - checks for output with an input with any negative number<br>
+ - checks for output with an input with any positive number<br>
+<br>
+- Checks for imaxdiv Testcases<br>
+ - checks for the output quotient and remainder with input with positive numbers<br>
+<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>