[PATCH] Bug fix to testcase g++.pt/ttp62.C
Kriang Lerdsuwanakij
lerdsuwa@scf.usc.edu
Thu Nov 16 00:17:00 GMT 2000
Hi
The testcase g++.pt/ttp62.C has a bug in it. (My fault - I
just copy it straight from the GNATS report). It only displays
the result to stdout but this cannot notify dejagnu in case
of failure. This patch fix this by calling abort() when the
test fails.
--Kriang
diff -cprN gcc-old/testsuite/g++.old-deja/g++.pt/ttp62.C gcc/testsuite/g++.old-deja/g++.pt/ttp62.C
*** gcc-old/testsuite/g++.old-deja/g++.pt/ttp62.C Wed Nov 15 22:40:40 2000
--- gcc/testsuite/g++.old-deja/g++.pt/ttp62.C Wed Nov 15 22:40:18 2000
***************
*** 1,6 ****
// Origin: Ewgenij Gawrilow <gawrilow@math.TU-Berlin.DE>
! #include <iostream>
template <template <class X> class B, class A>
struct is_instance_of {
--- 1,6 ----
// Origin: Ewgenij Gawrilow <gawrilow@math.TU-Berlin.DE>
! extern "C" void abort ();
template <template <class X> class B, class A>
struct is_instance_of {
*************** bool is_C (const T&) {
*** 21,27 ****
};
int main() {
! std::cout << "should be true: " << is_C(C<int>()) << std::endl;
! std::cout << "should be false: " << is_C(D<int>()) << std::endl;
return 0;
}
--- 21,29 ----
};
int main() {
! if (!is_C(C<int>()))
! abort ();
! if (is_C(D<int>()))
! abort ();
return 0;
}
More information about the Gcc-patches
mailing list