From 2d25605a546af33df11715eff5cc16393c0b2257 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 29 Nov 2003 17:42:16 +0000 Subject: [PATCH] 13171-2.cc: Tweak for a few small problems (fix timings, use VERIFY..) 2003-11-29 Paolo Carlini * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Tweak for a few small problems (fix timings, use VERIFY..) From-SVN: r74034 --- libstdc++-v3/ChangeLog | 5 +++++ .../27_io/basic_filebuf/imbue/char/13171-2.cc | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 31a4765c815..5e7d21f49ef 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-11-29 Paolo Carlini + + * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: + Tweak for a few small problems (fix timings, use VERIFY..) + 2003-11-28 Paolo Carlini * testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: Remove. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc index 65190ada681..74aa1fc0dfa 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -33,6 +32,9 @@ void test01() bool test __attribute__((unused)) = true; using namespace std; + locale loc_fr(__gnu_test::try_named_locale("fr_FR")); + locale loc_en(__gnu_test::try_named_locale("en_US")); + const char* name = "tmp_fifo_13171-2"; unlink(name); mkfifo(name, S_IRWXU); @@ -43,21 +45,25 @@ void test01() filebuf fb; fb.open(name, ios_base::out); fb.sputc('S'); + fb.pubsync(); + sleep(2); fb.close(); - return; + exit(0); } filebuf fb; - fb.pubimbue(__gnu_test::try_named_locale("fr_FR")); + fb.pubimbue(loc_fr); fb.open(name, ios_base::in); - assert(fb.is_open()); - fb.pubimbue(__gnu_test::try_named_locale("en_US")); + sleep(1); + VERIFY( fb.is_open() ); + fb.pubimbue(loc_en); filebuf::int_type c = fb.sgetc(); - assert(c == 'S'); fb.close(); + VERIFY( c == 'S' ); } int main() { test01(); + return 0; }