Skip to content

Commit

Permalink
update r974
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Oct 30, 2015
1 parent 99f4851 commit 42fdc6d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = iutest
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.13.99.3
PROJECT_NUMBER = 1.13.99.4

# 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 a
Expand Down
2 changes: 1 addition & 1 deletion include/impl/iutest_charcode.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ IUTEST_IPP_INLINE char* CodePointToUtf8(UInt32 code_point, char* buf, size_t siz
}
else
{
snprintf(buf, size, "(Invalid UTF16 0x%X)", code_point);
iu_snprintf(buf, size, "(Invalid UTF16 0x%X)", code_point);
}
return buf;
}
Expand Down
2 changes: 1 addition & 1 deletion include/impl/iutest_default_xml_generator.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ IUTEST_PRAGMA_CONSTEXPR_CALLED_AT_RUNTIME_WARN_DISABLE_BEGIN()
&& IsWhitespace(*src) )
{
char tmp[8];
snprintf(tmp, sizeof(tmp), "&#x%02X;", *src);
iu_snprintf(tmp, sizeof(tmp), "&#x%02X;", *src);
msg += tmp;
}
else
Expand Down
2 changes: 1 addition & 1 deletion include/internal/iutest_stdlib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# if IUTEST_HAS_CXX11
# if defined(__clang__)
# define IUTEST_HAS_STD_BEGIN_END 1
# elif defined(__GLIBCXX__) && __GLIBCXX__ > 20120712
# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
# define IUTEST_HAS_STD_BEGIN_END 1
# endif
# elif defined(_LIBCPP_STD_VER) && _LIBCPP_STD_VER >= 11
Expand Down
38 changes: 22 additions & 16 deletions include/internal/iutest_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@

IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN()

#if defined(_MSC_VER)
# define iu_snprintf _snprintf
#else
# define iu_snprintf snprintf
#endif

namespace iutest {
namespace detail
{
Expand Down Expand Up @@ -314,7 +320,7 @@ class iu_basic_stream
public:
typedef impl_select<void, T> select;
};
#define IUTEST_PP_XCS(txt_) xcs<_Elem>::select::constant(txt_, L##txt_)
#define IIUT_PP_XCS(txt_) xcs<_Elem>::select::constant(txt_, L##txt_)

struct impl
{
Expand Down Expand Up @@ -384,94 +390,94 @@ class iu_basic_stream
{
#if 0
_Elem a[16];
impl::tostring(a, 16, IUTEST_PP_XCS("%i"), v);
impl::tostring(a, 16, IIUT_PP_XCS("%i"), v);
s += a;
#else
s += (v ? IUTEST_PP_XCS("true") : IUTEST_PP_XCS("false"));
s += (v ? IIUT_PP_XCS("true") : IIUT_PP_XCS("false"));
#endif
return *this;
}
inline _Myt& operator<< (short v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%i"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%i"), v);
s += a;
return *this;
}
inline _Myt& operator<< (unsigned short v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%u"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%u"), v);
s += a;
return *this;
}
inline _Myt& operator<< (int v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%i"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%i"), v);
s += a;
return *this;
}
inline _Myt& operator<< (unsigned int v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%u"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%u"), v);
s += a;
return *this;
}
inline _Myt& operator<< (long v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%i"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%i"), v);
s += a;
return *this;
}
inline _Myt& operator<< (unsigned long v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%u"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%u"), v);
s += a;
return *this;
}
inline _Myt& operator<< (long long int v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%lld"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%lld"), v);
s += a;
return *this;
}
inline _Myt& operator<< (unsigned long long int v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%llu"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%llu"), v);
s += a;
return *this;
}
inline _Myt& operator<< (float v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%f"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%f"), v);
s += a;
return *this;
}
inline _Myt& operator<< (double v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%l"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%l"), v);
s += a;
return *this;
}
inline _Myt& operator<< (long double v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%L"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%L"), v);
s += a;
return *this;
}
inline _Myt& operator<< (const void* v)
{
_Elem a[64];
impl::tostring(a, 64, IUTEST_PP_XCS("%t"), v);
impl::tostring(a, 64, IIUT_PP_XCS("%t"), v);
s += a;
return *this;
}
Expand All @@ -485,7 +491,7 @@ class iu_basic_stream
void copyfmt(const _Myt&) {}
};

#undef IUTEST_PP_XCS
#undef IIUT_PP_XCS

#endif

Expand Down
4 changes: 2 additions & 2 deletions include/iutest_ver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

//======================================================================
// define
#define IUTEST_VER 0x01139903u //!< iutest version 1.13.99.3
#define IUTEST_VER 0x01139904u //!< iutest version 1.13.99.4
#define IUTEST_MAJORVER 0x01u //!< Major Version
#define IUTEST_MINORVER 0x13u //!< Minor Version
#define IUTEST_BUILD 0x99u //!< Build
#define IUTEST_REVISION 0x03u //!< Revision
#define IUTEST_REVISION 0x04u //!< Revision

/**
* @mainpage
Expand Down
2 changes: 1 addition & 1 deletion test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ NO_UNUSED_LOCAL_TYPEDEFS=-Wno-unused-local-typedefs
else
ifeq (1,$(shell expr \( $(GCCMAJOR) \> 4 \) \| \( $(GCCMAJOR) \>= 4 \& $(GCCMINOR) \>= 4 \)))
# 4.4 later
#STDFLAG += -std=c++0x
STDFLAG += -std=c++0x
endif
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ STDFLAG += -std=c++11
else
ifeq (1,$(shell expr \( $(GCCMAJOR) \> 4 \) \| \( $(GCCMAJOR) \>= 4 \& $(GCCMINOR) \>= 4 \)))
# 4.4 later
#STDFLAG += -std=c++0x
STDFLAG += -std=c++0x
endif
endif
endif
Expand Down

0 comments on commit 42fdc6d

Please sign in to comment.