Unverified Commit a735badb authored by Milo Yip's avatar Milo Yip Committed by GitHub

Merge pull request #1162 from Tencent/travis

Fix Travis build due to clang noexcept issue in unittest
Fix #1159
parents 0d95d58f d48290e3
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // 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" #include "unittest.h"
// test another instantiation of RapidJSON in a different namespace // test another instantiation of RapidJSON in a different namespace
......
...@@ -117,6 +117,9 @@ public: ...@@ -117,6 +117,9 @@ public:
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
// Not using noexcept for testing RAPIDJSON_ASSERT()
#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0
#ifndef RAPIDJSON_ASSERT #ifndef RAPIDJSON_ASSERT
#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u) #define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment