1# /* **************************************************************************
2# * *
3# * (C) Copyright Edward Diener 2018.
4# * Distributed under the Boost Software License, Version 1.0. (See
5# * accompanying file LICENSE_1_0.txt or copy at
6# * http://www.boost.org/LICENSE_1_0.txt)
7# * *
8# ************************************************************************** */
9#
10# /* See http://www.boost.org for most recent version. */
11#
12# include <boost/preprocessor/stringize.hpp>
13# include <boost/preprocessor/wstringize.hpp>
14# include <boost/preprocessor/arithmetic/inc.hpp>
15# if !defined __cplusplus
16#include <wchar.h>
17#endif
18# include "test.h"
19
20#define VDATA 1,2,3,4
21#define NDATA
22#define DATA data
23#define FDATA(x) BOOST_PP_INC(x)
24
25# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
26BEGIN sizeof(BOOST_PP_STRINGIZE(NDATA)) / sizeof(char) == 1 END
27BEGIN sizeof(BOOST_PP_WSTRINGIZE(NDATA)) / sizeof(wchar_t) == 1 END
28#endif
29BEGIN sizeof(BOOST_PP_STRINGIZE(DATA)) / sizeof(char) == 5 END
30BEGIN sizeof(BOOST_PP_STRINGIZE(FDATA(1))) / sizeof(char) == 2 END
31BEGIN sizeof(BOOST_PP_STRINGIZE(FDATA(9))) / sizeof(char) == 3 END
32BEGIN sizeof(BOOST_PP_WSTRINGIZE(DATA)) / sizeof(wchar_t) == 5 END
33BEGIN sizeof(BOOST_PP_WSTRINGIZE(FDATA(1))) / sizeof(wchar_t) == 2 END
34BEGIN sizeof(BOOST_PP_WSTRINGIZE(FDATA(9))) / sizeof(wchar_t) == 3 END
35BEGIN sizeof(BOOST_PP_STRINGIZE(VDATA)) / sizeof(char) == 8 END
36BEGIN sizeof(BOOST_PP_WSTRINGIZE(VDATA)) / sizeof(wchar_t) == 8 END
37

source code of boost/libs/preprocessor/test/stringize.cxx