Skip to content

Commit a735bad

Browse files
authored
Merge pull request Tencent#1162 from Tencent/travis
Fix Travis build due to clang noexcept issue in unittest Fix Tencent#1159
2 parents 0d95d58 + d48290e commit a735bad

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

test/unittest/namespacetest.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
1313
// specific language governing permissions and limitations under the License.
1414

15-
// Not throwing exception for this test
16-
#include <cassert>
17-
#define RAPIDJSON_ASSERT(x) assert(x)
18-
1915
#include "unittest.h"
2016

2117
// test another instantiation of RapidJSON in a different namespace

test/unittest/unittest.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ class AssertException : public std::logic_error {
117117
#pragma GCC diagnostic pop
118118
#endif
119119

120+
// Not using noexcept for testing RAPIDJSON_ASSERT()
121+
#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0
122+
120123
#ifndef RAPIDJSON_ASSERT
121124
#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
122125
#endif

0 commit comments

Comments
 (0)