#include <stdexcept>
#include <string>
#include <rw_new.h>
#include <rw_driver.h>
#include <cstddef>
Go to the source code of this file.
◆ _PTR_THROWS
| #define _PTR_THROWS |
( |
|
spec | ) |
_THROWS (spec) |
◆ TEST_DEF
Value: typedef std::T
T ## _type; \
TEST_NAMESPACE_DEF (
T); \
\
\
\
std::T& (std::T::*p_assign_ ##
T)(
const std::T&) \
_PTR_THROWS(()) = &std::T::operator=; \
_RWSTD_UNUSED (p_assign_ ##
T); \
\
const char* (std::T::*p_what_ ##
T)() const \
\
result = result << 1 | cmp (obj_ ## T.what (), \
"std::" _RWSTD_STR (T))
#define _PTR_THROWS(spec)
#define _RWSTD_UNUSED(arg)
Definition at line 112 of file 19.std.exceptions.cpp.
◆ TEST_EX_SPEC
| #define TEST_EX_SPEC |
( |
|
T | ) |
|
Value: do { \
\
*pst->throw_at_calls_ [0] = std::size_t (-1); \
*pst->throw_at_calls_ [1] = std::size_t (-1); \
\
test_throw ((std:: T*)0,
"std::" #
T); \
\
*pst->throw_at_calls_ [0] = pst->new_calls_ [0] + 1; \
*pst->throw_at_calls_ [1] = pst->new_calls_ [1] + 1; \
\
\
\
rw_assert (threw == new_throws, 0, __LINE__, \
"attempthing to construct a std::" #
T " %s an exception", \
new_throws ? "failed to rethrow" : "unexpectedly threw"); \
} while (0)
int test_ex_spec(Exception *, const char *str)
◆ TEST_NAMESPACE_DEF
| #define TEST_NAMESPACE_DEF |
( |
|
T | ) |
void T () |
◆ cmp()
| int cmp |
( |
const char * |
s1, |
|
|
const char * |
s2 |
|
) |
| |
◆ is_explicit() [1/10]
◆ is_explicit() [2/10]
| void is_explicit |
( |
const std::domain_error & |
| ) |
|
◆ is_explicit() [3/10]
| void is_explicit |
( |
const std::invalid_argument & |
| ) |
|
◆ is_explicit() [4/10]
| void is_explicit |
( |
const std::length_error & |
| ) |
|
◆ is_explicit() [5/10]
| void is_explicit |
( |
const std::logic_error & |
| ) |
|
◆ is_explicit() [6/10]
| void is_explicit |
( |
const std::out_of_range & |
| ) |
|
◆ is_explicit() [7/10]
| void is_explicit |
( |
const std::overflow_error & |
| ) |
|
◆ is_explicit() [8/10]
| void is_explicit |
( |
const std::range_error & |
| ) |
|
◆ is_explicit() [9/10]
| void is_explicit |
( |
const std::runtime_error & |
| ) |
|
◆ is_explicit() [10/10]
| void is_explicit |
( |
const std::underflow_error & |
| ) |
|
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ test_ex_spec()
| int test_ex_spec |
( |
Exception * |
, |
|
|
const char * |
str |
|
) |
| |
19.std.exceptions.cpp - test exercising [lib.std.exceptions]
$Id$
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2001-2008 Rogue Wave Software.
Definition at line 35 of file 19.std.exceptions.cpp.
◆ test_throw()
| int test_throw |
( |
Exception * |
, |
|
|
const char * |
str |
|
) |
| |