summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/19_diagnostics
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-27 04:28:36 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-27 04:28:36 +0000
commit345d9aabc23df1cd9f76f749d7dbb73b6c6d7db5 (patch)
tree219c6f29e00435e03592acefb06605c802789c92 /libstdc++-v3/testsuite/19_diagnostics
parent1b3b71c42c97dedae849bb0ef2d5e34c0603af82 (diff)
downloadppe42-gcc-345d9aabc23df1cd9f76f749d7dbb73b6c6d7db5.tar.gz
ppe42-gcc-345d9aabc23df1cd9f76f749d7dbb73b6c6d7db5.zip
2001-02-26 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/1972 libstdc++/2089 * include/bits/std_stdexcept.h (logic_error::logic_error): Use string object, not reference. (runtime_error::runtime_error): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/19_diagnostics')
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
index ac56b594ab2..6969ae19e95 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
@@ -28,23 +28,23 @@
void test01()
{
bool test = true;
- const char* strlit = "lack of sunlight, no water error";
+ std::string s("lack of sunlight, no water error");
// XXX work around long-standing, pathalogical, hostility-inducing parser bug
// std::logic_error obj(std::string(strlit));
// 1
- std::logic_error obj = std::logic_error(std::string(strlit));
+ std::logic_error obj = std::logic_error(s);
// 2
// std::logic_error obj((std::string)strlit);
- VERIFY( strcmp(obj.what(), strlit) );
+ VERIFY( strcmp(obj.what(), s.data()) );
}
void test02()
{
bool test = true;
- std::string s = "lack of sunlight error";
+ std::string s("lack of sunlight error");
std::domain_error x(s);
VERIFY( strcmp(x.what(), s.data()) );
OpenPOWER on IntegriCloud