Merge pull request #1162 from Tencent/travis

Fix Travis build due to clang noexcept issue in unittest
Fix #1159
This commit is contained in:
Milo Yip 2018-01-13 13:15:54 +08:00 committed by GitHub
commit a735badbd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -12,10 +12,6 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
// Not throwing exception for this test
#include <cassert>
#define RAPIDJSON_ASSERT(x) assert(x)
#include "unittest.h"
// test another instantiation of RapidJSON in a different namespace

View File

@ -117,6 +117,9 @@ public:
#pragma GCC diagnostic pop
#endif
// Not using noexcept for testing RAPIDJSON_ASSERT()
#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0
#ifndef RAPIDJSON_ASSERT
#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
#endif