27 lines · cpp
1// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 | FileCheck %s2 3constexpr int value(float f) { return int(f); }4 5enum MyEnum {6hexadecimal = 0x10 //!< a7// CHECK: <Declaration>hexadecimal = 0x10</Declaration>8 9, withSuffix = 1u + 010 //!< b10// CHECK: <Declaration>withSuffix = 1u + 010</Declaration>11 12#define ARG(x) x13, macroArg = ARG(0x1) //!< c14// CHECK: <Declaration>macroArg = ARG(0x1)</Declaration>15 16#define MACROCONCAT(x, y) 22##x##y17, macroConcat = MACROCONCAT(3, 2) //!< d18// CHECK: <Declaration>macroConcat = MACROCONCAT(3, 2)</Declaration>19 20#define MACRO(a,n) = 0x##a##n21, weirdMacros MACRO(2,1) //!< e22// CHECK: <Declaration>weirdMacros = 33</Declaration>23 24, floatLiteral = value(0.25e3) //!< f25// CHECK: <Declaration>floatLiteral = value(0.25e3)</Declaration>26};27