Skip to content

Commit

Permalink
update r809
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Apr 6, 2015
1 parent 5f49528 commit c97540d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/Doxyfile
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME = iutest_c
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 1.5.0.8
PROJECT_NUMBER = 1.5.0.9

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
Expand Down
10 changes: 8 additions & 2 deletions include/impl/iutest_printer_c.inl
Expand Up @@ -6,7 +6,7 @@
*
* @author t.sirayanagi
* @par copyright
* Copyright (C) 2012-2014, Takazumi Shirayanagi\n
* Copyright (C) 2012-2015, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand Down Expand Up @@ -127,6 +127,7 @@ IUTEST_C_INL_INLINE IUTEST_ATTRIBUTE_UNUSED_ char* iuTest_PrintTo(char* dst, con
*dst++ = ' ';
*dst++ = iuString_ToHex(((*src)>>4)&0xF);
*dst++ = iuString_ToHex(((*src)>>0)&0xF);
++src;
}
}
else
Expand All @@ -137,17 +138,22 @@ IUTEST_C_INL_INLINE IUTEST_ATTRIBUTE_UNUSED_ char* iuTest_PrintTo(char* dst, con
*dst++ = ' ';
*dst++ = iuString_ToHex(((*src)>>4)&0xF);
*dst++ = iuString_ToHex(((*src)>>0)&0xF);
++src;
}
*dst++ = ',';
*dst++ = ' ';
*dst++ = '.';
*dst++ = '.';
*dst++ = '.';
*dst++ = ' ';
for( i=0; i < MAX/2; ++i )
src += size - MAX;
for( i=0; i < MAX / 2; ++i )
{
*dst++ = ',';
*dst++ = ' ';
*dst++ = iuString_ToHex(((*src)>>4)&0xF);
*dst++ = iuString_ToHex(((*src)>>0)&0xF);
++src;
}
}
*dst++ = ' ';
Expand Down
4 changes: 2 additions & 2 deletions include/iutest_ver_c.h
Expand Up @@ -16,11 +16,11 @@
#define INCG_IRIS_IUTEST_VER_C_H_D65CB7A7_D2AD_40FE_8F5F_8FBF376A0010_

/* define ============================================================*/
#define IUTEST_C_VER 0x01050008 /*!< iutest version 1.5.0.8 */
#define IUTEST_C_VER 0x01050009 /*!< iutest version 1.5.0.9 */
#define IUTEST_C_MAJORVER 0x01 /*!< Major Version */
#define IUTEST_C_MINORVER 0x05 /*!< Minor Version */
#define IUTEST_C_BUILD 0x00 /*!< Build */
#define IUTEST_C_REVISION 0x08 /*!< Revision */
#define IUTEST_C_REVISION 0x09 /*!< Revision */

/**
* @mainpage
Expand Down
15 changes: 15 additions & 0 deletions test/iutest_unit_tests.c
Expand Up @@ -122,6 +122,21 @@ IUTEST(FormatUnit, PrintTo)
const char* p = iuTest_PrintTo(s, &c, sizeof(c));
IUTEST_ASSERT_STREQ("0x000000000000002A", p);
}
{
int c[2]={42, 43};
const char* p = iuTest_PrintTo(s, c, sizeof(c));
IUTEST_ASSERT_STREQ("0x0000002B0000002A", p);
}
#endif
{
char c[9]={42, 43, 44, 45, 46, 47, 48, 49, 50};
const char* p = iuTest_PrintTo(s, c, sizeof(c));
IUTEST_ASSERT_STREQ("{ 2A, 2B, 2C, 2D, 2E, 2F, 30, 31, 32 }", p);
}
{
int c[4]={42, 43, 44, 45};
const char* p = iuTest_PrintTo(s, c, sizeof(c));
IUTEST_ASSERT_STREQ("{ 2A, 00, 00, 00, 2B, ... , 00, 2D, 00, 00, 00 }", p);
}
}

0 comments on commit c97540d

Please sign in to comment.