blob: c5ac896926191a063115299895be075f48bb3ade (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From cd1bb68f56ade6449c6d52a1916c6a58f09f59e6 Mon Sep 17 00:00:00 2001
From: hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 19 Apr 2011 03:58:04 +0000
Subject: [PATCH 146/200] PR testsuite/48675
* testsuite/20_util/hash/chi2_quality.cc (test_document_words): Stub
this part if SAMPLES < 100000.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172691 138bc75d-0d04-0410-961f-82ee72b054a4
index d626d82..8a38834 100644
--- a/libstdc++-v3/testsuite/20_util/hash/chi2_quality.cc
+++ b/libstdc++-v3/testsuite/20_util/hash/chi2_quality.cc
@@ -183,6 +183,10 @@ test_bit_string_set()
void
test_document_words()
{
+ // That file is 187587 single-word lines. To avoid a timeout, just skip
+ // this part, which would take up to 95% of the program runtime (with
+ // SAMPLES == 10000), if we're not supposed to run anywhere that long.
+#if SAMPLES >= 100000
bool test __attribute__((unused)) = true;
const std::string f_name = "thirty_years_among_the_dead_preproc.txt";
std::ifstream in(f_name);
@@ -199,6 +203,7 @@ test_document_words()
const unsigned long k = words.size() / 20;
double chi2 = chi2_hash(words, k);
VERIFY( chi2 < k*1.1 );
+#endif
}
int
--
1.7.0.4
|