]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.3.3/doc/html/ext/pb_ds/assoc_regression_tests.html
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.3.3 / doc / html / ext / pb_ds / assoc_regression_tests.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6   <meta name="generator" content=
7   "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
8
9   <title>Associative-Container Regression Tests</title>
10   <meta http-equiv="Content-Type" content=
11   "text/html; charset=us-ascii" />
12   </head>
13
14 <body>
15   <div id="page">
16     <h1>Associative-Container Regression Tests</h1>
17
18     <h2><a name="assoc_desc" id="assoc_desc">Description</a></h2>
19
20     <p>The library contains a single comprehensive regression test.
21     For a given container type in <tt>pb_ds</tt>, the test creates
22     an object of the container type and an object of the
23     corresponding STL type (<i>e.g.</i>, <tt>std::set</tt>). It
24     then performs a random sequence of methods with random
25     arguments (<i>e.g.</i>, inserts, erases, and so forth) on both
26     objects. At each operation, the test checks the return value of
27     the method, and optionally both compares <tt>pb_ds</tt>'s
28     object with the STL's object as well as performing other
29     consistency checks on <tt>pb_ds</tt>'s object (<i>e.g.</i>,
30     order preservation, when applicable, or node invariants, when
31     applicable).</p>
32
33     <p>Additionally, the test integrally checks exception safety
34     and resource leaks. This is done as follows. A special
35     allocator type, written for the purpose of the test, both
36     randomly throws an exceptions when allocations are performed,
37     and tracks allocations and de-allocations. The exceptions thrown
38     at allocations simulate memory-allocation failures; the
39     tracking mechanism checks for memory-related bugs (<i>e.g.</i>,
40     resource leaks and multiple de-allocations). Both
41     <tt>pb_ds</tt>'s containers and the containers' value-types are
42     configured to use this allocator.</p>
43
44     <p>Due to compiler constraints, the test is split into the
45     several sources, each checking only some containers.</p>
46
47     <h2><a name="assoc_tests" id="assoc_tests">Tests</a></h2>
48
49     <h3><a name="assoc_tests_set" id="assoc_tests_set">"Set"
50     Tests</a></h3>
51
52     <p>The following check all "set" types:</p>
53
54     <ol>
55       <li><a href=
56       "../../../../testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc"><tt>hash_no_data_map_rand.cc</tt></a>
57       checks all hash-based "set" types.</li>
58
59       <li><a href=
60       "../../../../testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc"><tt>list_update_no_data_map_rand.cc</tt></a>
61       checks all list-based "set" types.</li>
62
63       <li><a href=
64       "../../../../testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc"><tt>tree_no_data_map_rand.cc</tt></a>
65       checks all tree-based "set" types.</li>
66
67       <li><a href=
68       "../../../../testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc"><tt>trie_no_data_map_rand.cc</tt></a>
69       checks all PATRICIA-trie-based "set" types.</li>
70     </ol>
71
72     <h3><a name="assoc_tests_map" id="assoc_tests_map">"Map"
73     Tests</a></h3>
74
75     <p>The following check all "map" types:</p>
76
77     <ol>
78       <li><a href=
79       "../../../../testsuite/ext/pb_ds/regression/hash_data_map_rand.cc"><tt>hash_data_map_rand.cc</tt></a>
80       checks all hash-based "map" types.</li>
81
82       <li><a href=
83       "../../../../testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc"><tt>list_update_data_map_rand.cc</tt></a>
84       checks all list-based "map" types.</li>
85
86       <li><a href=
87       "../../../../testsuite/ext/pb_ds/regression/tree_data_map_rand.cc"><tt>tree_data_map_rand.cc</tt></a>
88       checks all tree-based "map" types.</li>
89
90       <li><a href=
91       "../../../../testsuite/ext/pb_ds/regression/trie_data_map_rand.cc"><tt>trie_data_map_rand.cc</tt></a>
92       checks all PATRICIA-trie-based "map" types.</li>
93     </ol>
94   </div>
95 </body>
96 </html>