File: reference.html

package info (click to toggle)
boost1.42 1.42.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 277,864 kB
  • ctags: 401,076
  • sloc: cpp: 1,235,659; xml: 74,142; ansic: 41,313; python: 26,756; sh: 11,840; cs: 2,118; makefile: 655; perl: 494; yacc: 456; asm: 353; csh: 6
file content (1085 lines) | stat: -rwxr-xr-x 66,042 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>The UTF testing tools reference</title>
<link rel="stylesheet" href="../../../style/style.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Boost Test Library">
<link rel="up" href="../testing-tools.html" title="The UTF testing tools or tester's toolbox for all occasions">
<link rel="prev" href="floating_point_comparison.html" title="Floating-point comparison algorithms">
<link rel="next" href="../usage-recommendations.html" title="The unit test framework usage recommendations">
<script language="JavaScript1.2" src="../../../js/boost-test.js"></script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table width="100%"><tr>
<td width="10%"><a href="../../index.html"><img alt="Home" width="229" height="61" border="0" src="../../../../../../libs/test/docbook/img/boost.test.logo.png"></a></td>
<td valign="middle" align="left"> &gt; <a href="../../utf.html">The Unit Test Framework</a> &gt; <a href="../testing-tools.html">Testing tools</a><a href="../usage-recommendations.html">
      &gt;
      </a><b>Reference</b>
</td>
<td><div class="spirit-nav">
<a href="floating_point_comparison.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a href="../usage-recommendations.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div></td>
</tr></table>
<hr>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="utf.testing-tools.reference"></a>The <acronym class="acronym">UTF</acronym> testing tools reference</h4></div></div></div>
<script language="JavaScript1.2">
     var id298906;
   </script><table class="inline-reference"><tr>
<td class="index" valign="top"><ul>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_BITWISE_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_BITWISE_EQUAL</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE_FRACTION', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE_FRACTION</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL_COLLECTION', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL_COLLECTION</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EXCEPTION', id298906 ); return false;">BOOST_&lt;level&gt;_EXCEPTION</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GE', id298906 ); return false;">BOOST_&lt;level&gt;_GE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GT', id298906 ); return false;">BOOST_&lt;level&gt;_GT</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LE', id298906 ); return false;">BOOST_&lt;level&gt;_LE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LT', id298906 ); return false;">BOOST_&lt;level&gt;_LT</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_MESSAGE', id298906 ); return false;">BOOST_&lt;level&gt;_MESSAGE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_NE', id298906 ); return false;">BOOST_&lt;level&gt;_NE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_NO_THROW', id298906 ); return false;">BOOST_&lt;level&gt;_NO_THROW</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_PREDICATE', id298906 ); return false;">BOOST_&lt;level&gt;_PREDICATE</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_SMALL', id298906 ); return false;">BOOST_&lt;level&gt;_SMALL</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_THROW', id298906 ); return false;">BOOST_&lt;level&gt;_THROW</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_ERROR', id298906 ); return false;">BOOST_ERROR</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_FAIL', id298906 ); return false;">BOOST_FAIL</a></li>
<li><a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_IS_DEFINED', id298906 ); return false;">BOOST_IS_DEFINED</a></li>
</ul></td>
<td class="content" valign="top">
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;">
<pre class="inline-synopsis">
<a name="BOOST_WARN"></a>BOOST_WARN(<span class="emphasis"><em>predicate</em></span>)
<a name="BOOST_CHECK"></a>BOOST_CHECK(<span class="emphasis"><em>predicate</em></span>)
<a name="BOOST_REQUIRE"></a>BOOST_REQUIRE(<span class="emphasis"><em>predicate</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to validate the predicate value. The only parameter for these tools is a boolean predicate
     value that gets validated. It could be any expression that could be evaluated and converted to boolean value. The
     expression gets evaluated only once, so it's safe to pass complex expression for validation.
    </p>
<div class="example">
<a name=".example34"></a><p class="title"><b>Example38.BOOST_&lt;level&gt; usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i=2;
    BOOST_WARN( sizeof(int) == sizeof(short) );
    BOOST_CHECK( i == 1 );
    BOOST_REQUIRE( i &gt; 5 );
    BOOST_CHECK( i == 6 ); // will never reach this check
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example34.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id659766" onclick="toggle_element( 'example34-output', 'id659766', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example34-output">&gt; example --log_level=warning
Running 1 test case...
test.cpp(9): warning in "test": condition sizeof(int) == sizeof(short) is not satisfied
test.cpp(10): error in "test": check i == 1 failed
test.cpp(11): fatal error in "test": critical check i &gt; 5 failed

*** 2 failures detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_MESSAGE', id298906 ); return false;">BOOST_&lt;level&gt;_MESSAGE</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_BITWISE_EQUAL">
<pre class="inline-synopsis">
<a name="BOOST_WARN_BITWISE_EQUAL"></a>BOOST_WARN_BITWISE_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_BITWISE_EQUAL"></a>BOOST_CHECK_BITWISE_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_BITWISE_EQUAL"></a>BOOST_REQUIRE_BITWISE_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to perform bitwise comparison of two values. The check shows all positions where left and 
     right value's bits mismatch.
    </p>
<p class="first-line-indented">
     The first parameter is the left compared value. The second parameter is the right compared value. Parameters are
     not required to be of the same type, but warning is issued if their type's size does not coincide.
    </p>
<div class="example">
<a name=".example33"></a><p class="title"><b>Example39.BOOST_&lt;level&gt;_BITWISE_EQUAL usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_CHECK_BITWISE_EQUAL( (char)0x26, 0x04 );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example33.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id659940" onclick="toggle_element( 'example33-output', 'id659940', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example33-output">&gt; example
Running 1 test case...                                                          
test.cpp(8): error in "test": check (char)0x26 =.= 0x04 failed.                 
Mismatch in a position 1                                                        
Mismatch in a position 5                                                        
Operands bit sizes mismatch: 8 != 32                                            
                                                                                
*** 1 failure detected in test suite "example" </pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_CLOSE"></a>BOOST_WARN_CLOSE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_CHECK_CLOSE"></a>BOOST_CHECK_CLOSE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_REQUIRE_CLOSE"></a>BOOST_REQUIRE_CLOSE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to check on closeness using strong relationship defined by the predicate 
     <code class="computeroutput">check_is_close</code>( left, right, tolerance ). To check for the weak relationship use 
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_PREDICATE', id298906 ); return false;">BOOST_&lt;level&gt;_PREDICATE</a> family of tools with explicit <code class="computeroutput">check_is_close</code>
     invocation.
    </p>
<p>
     The first parameter is the <span class="emphasis"><em>left</em></span> compared value. The second parameter is the 
     <span class="emphasis"><em>right</em></span> compared value. Last third parameter defines the tolerance for the comparison in 
     <a class="link" href="floating_point_comparison.html#utf.testing-tools.fpv-comparison.tolerance-selection" title="Tolerance selection considerations"><span class="bold"><strong>percentage units</strong></span></a>.
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      It is required for left and right parameters to be of the same floating point type. You will need to explicitly 
      resolve any type mismatch to select which type to use for comparison.
     </p></td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      Note that to use these tools you need to include additional header floating_point_comparison.hpp. 
     </p></td></tr>
</table></div>
<div class="example">
<a name=".example42"></a><p class="title"><b>Example40.BOOST_&lt;level&gt;_CLOSE usage with very small values</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;
#include &lt;boost/test/floating_point_comparison.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    double v1 = 1.23456e-10;
    double v2 = 1.23457e-10;

    BOOST_CHECK_CLOSE( v1, v2, 0.0001 );
    // Absolute value of difference between these two values is 1e-15. They seems 
    // to be very close. But we want to checks that these values differ no more then 0.0001%
    // of their value. And this test will fail at tolerance supplied.
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example42.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id660188" onclick="toggle_element( 'example42-output', 'id660188', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example42-output">&gt; example
Running 1 test case...
test.cpp(12): error in "test": difference between v1{1.23456e-010} and v2{1.23457e-010} exceeds 0.0001%

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><div class="example">
<a name=".example43"></a><p class="title"><b>Example41.BOOST_&lt;level&gt;_CLOSE usage with very big values</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;
#include &lt;boost/test/floating_point_comparison.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    double v1 = 1.23456e28;
    double v2 = 1.23457e28;

    BOOST_REQUIRE_CLOSE( v1, v2, 0.001 );
    // Absolute value of difference between these two values is 1e+23.
    // But we are interested only that it does not exeed 0.001% of a values compared
    // And this test will pass.
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example43.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id660271" onclick="toggle_element( 'example43-output', 'id660271', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example43-output">&gt; example
Running 1 test case...

*** No errors detected
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE_FRACTION', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE_FRACTION</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_SMALL', id298906 ); return false;">BOOST_&lt;level&gt;_SMALL</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a>,
     <a class="link" href="floating_point_comparison.html" title="Floating-point comparison algorithms">Floating point comparison algorithms</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE_FRACTION">
<pre class="inline-synopsis">
<a name="BOOST_WARN_CLOSE_FRACTION"></a>BOOST_WARN_CLOSE_FRACTION(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_CHECK_CLOSE_FRACTION"></a>BOOST_CHECK_CLOSE_FRACTION(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_REQUIRE_CLOSE_FRACTION"></a>BOOST_REQUIRE_CLOSE_FRACTION(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>, <span class="emphasis"><em>tolerance</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to check on closeness using strong relationship defined by the predicate 
     <code class="computeroutput">check_is_close</code>( left, right, tolerance ). To check for the weak relationship use 
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_PREDICATE', id298906 ); return false;">BOOST_&lt;level&gt;_PREDICATE</a> family of tools with explicit <code class="computeroutput">check_is_close</code>
     invocation.
    </p>
<p>
     The first parameter is the <span class="emphasis"><em>left</em></span> compared value. The second parameter is the 
     <span class="emphasis"><em>right</em></span> compared value. Last third parameter defines the tolerance for the comparison in 
     <a class="link" href="floating_point_comparison.html#utf.testing-tools.fpv-comparison.tolerance-selection" title="Tolerance selection considerations"><span class="bold"><strong>percentage units</strong></span></a>.
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      It is required for left and right parameters to be of the same floating point type. You will need to explicitly 
      resolve any type mismatch to select which type to use for comparison.
     </p></td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      Note that to use these tools you need to include additional header floating_point_comparison.hpp. 
     </p></td></tr>
</table></div>
<div class="example">
<a name=".example44"></a><p class="title"><b>Example42.BOOST_&lt;level&gt;_CLOSE_FRACTION usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;
#include &lt;boost/test/floating_point_comparison.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    double v1 = 1.111e-10;
    double v2 = 1.112e-10;

    BOOST_CHECK_CLOSE_FRACTION( v1, v2, 0.0008999 );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example44.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id660537" onclick="toggle_element( 'example44-output', 'id660537', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example44-output">&gt; example
Running 1 test case...
test.cpp(12): error in "test": difference between v1{1.111e-010} and v2{1.112e-010} exceeds 0.0008999

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_SMALL', id298906 ); return false;">BOOST_&lt;level&gt;_SMALL</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a>,
     <a class="link" href="floating_point_comparison.html" title="Floating-point comparison algorithms">Floating point comparison algorithms</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL">
<pre class="inline-synopsis">
<a name="BOOST_WARN_EQUAL"></a>BOOST_WARN_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_EQUAL"></a>BOOST_CHECK_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_EQUAL"></a>BOOST_REQUIRE_EQUAL(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left == right ).
     The difference is that the mismatched values are reported as well.
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      It is bad idea to use these tools to compare floating point values. Use <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a> or 
      <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE_FRACTION', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE_FRACTION</a> tools instead.
     </p></td></tr>
</table></div>
<div class="example">
<a name=".example35"></a><p class="title"><b>Example43.BOOST_&lt;level&gt;_EQUAL usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 2;
    int j = 1;
    BOOST_REQUIRE_EQUAL( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example35.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id660741" onclick="toggle_element( 'example35-output', 'id660741', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example35-output">&gt; example
Running 1 test case...
test.cpp(10): fatal error in "test": critical check i == j failed [2 != 1]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_NE', id298906 ); return false;">BOOST_&lt;level&gt;_NE</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL_COLLECTION">
<pre class="inline-synopsis">
<a name="BOOST_WARN_EQUAL_COLLECTION"></a>BOOST_WARN_EQUAL_COLLECTION(<span class="emphasis"><em>left_begin</em></span>, <span class="emphasis"><em>left_end</em></span>, <span class="emphasis"><em>right_begin</em></span>, <span class="emphasis"><em>right_end</em></span>)
<a name="BOOST_CHECK_EQUAL_COLLECTION"></a>BOOST_CHECK_EQUAL_COLLECTION(<span class="emphasis"><em>left_begin</em></span>, <span class="emphasis"><em>left_end</em></span>, <span class="emphasis"><em>right_begin</em></span>, <span class="emphasis"><em>right_end</em></span>)
<a name="BOOST_REQUIRE_EQUAL_COLLECTION"></a>BOOST_REQUIRE_EQUAL_COLLECTION(<span class="emphasis"><em>left_begin</em></span>, <span class="emphasis"><em>left_end</em></span>, <span class="emphasis"><em>right_begin</em></span>, <span class="emphasis"><em>right_end</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to perform an element by element comparison of two collections. They print all mismatched 
     positions, collection elements at these positions and check that the collections have the same size. The first two 
     parameters designate begin and end of the first collection. The two parameters designate begin and end of the 
     second collection.
    </p>
<div class="example">
<a name=".example36"></a><p class="title"><b>Example44.BOOST_&lt;level&gt;_EQUAL_COLLECTION usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int col1 [] = { 1, 2, 3, 4, 5, 6, 7 };
    int col2 [] = { 1, 2, 4, 4, 5, 7, 7 };

    BOOST_CHECK_EQUAL_COLLECTIONS( col1, col1+7, col2, col2+7 );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example36.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id660942" onclick="toggle_element( 'example36-output', 'id660942', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example36-output">&gt; example
Running 1 test case...
test.cpp(11): error in "test": check { col1, col1+7 } == { col2, col2+7 } failed. 
Mismatch in a position 2: 3 != 4
Mismatch in a position 5: 6 != 7

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EXCEPTION">
<pre class="inline-synopsis">
<a name="BOOST_WARN_EXCEPTION"></a>BOOST_WARN_EXCEPTION(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>, <span class="emphasis"><em>predicate</em></span>)
<a name="BOOST_CHECK_EXCEPTION"></a>BOOST_CHECK_EXCEPTION(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>, <span class="emphasis"><em>predicate</em></span>)
<a name="BOOST_REQUIRE_EXCEPTION"></a>BOOST_REQUIRE_EXCEPTION(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>, <span class="emphasis"><em>predicate</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to perform an exception detection and validation check. Tools execute the supplied expression 
     and validate that it throws an exception of supplied class (or the one derived from it) that complies with the 
     supplied predicate. If the expression throws any other unrelated exception, doesn't throw at all or 
     predicate evaluates to false, check fails. In comparison with <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_THROW', id298906 ); return false;">BOOST_&lt;level&gt;_THROW</a> tools these
     allow performing more fine-grained checks. For example: make sure that an expected exception has specific 
     error message.
    </p>
<div class="example">
<a name=".example37"></a><p class="title"><b>Example45.BOOST_&lt;level&gt;_EXCEPTION usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

struct my_exception {
    explicit my_exception( int ec = 0 ) : m_error_code( ec ) {}

    int m_error_code;
};

bool is_critical( my_exception const&amp; ex ) { return ex.m_error_code &lt; 0; }

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_CHECK_EXCEPTION( throw my_exception( 1 ), my_exception, is_critical );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example37.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id661130" onclick="toggle_element( 'example37-output', 'id661130', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example37-output">&gt; example
Running 1 test case...
test.cpp(16): error in "test": incorrect exception my_exception is caught

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_THROW', id298906 ); return false;">BOOST_&lt;level&gt;_THROW</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_GE"></a>BOOST_WARN_GE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_GE"></a>BOOST_CHECK_GE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_GE"></a>BOOST_REQUIRE_GE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left &gt;= right ).
     The difference is that the argument values are reported as well.
    </p>
<div class="example">
<a name=".example57"></a><p class="title"><b>Example46.BOOST_&lt;level&gt;_GE usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 1;
    int j = 4;
    BOOST_CHECK_GE( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example57.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id661298" onclick="toggle_element( 'example57-output', 'id661298', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example57-output">&gt;example
Running 1 test case...
test.cpp(10): error in "test": check i &gt;= j failed [1 &lt; 4]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LE', id298906 ); return false;">BOOST_&lt;level&gt;_LE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LT', id298906 ); return false;">BOOST_&lt;level&gt;_LT</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GT', id298906 ); return false;">BOOST_&lt;level&gt;_GT</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GT">
<pre class="inline-synopsis">
<a name="BOOST_WARN_GT"></a>BOOST_WARN_GT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_GT"></a>BOOST_CHECK_GT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_GT"></a>BOOST_REQUIRE_GT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left &gt;= right ).
     The difference is that the argument values are reported as well.
    </p>
<div class="example">
<a name=".example58"></a><p class="title"><b>Example47.BOOST_&lt;level&gt;_GT usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 2;
    int j = 14;
    BOOST_CHECK_GT( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example58.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id661474" onclick="toggle_element( 'example58-output', 'id661474', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example58-output">&gt;example
Running 1 test case...
test.cpp(10): error in "test": check i &gt; j failed [2 &lt; 14]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LE', id298906 ); return false;">BOOST_&lt;level&gt;_LE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LT', id298906 ); return false;">BOOST_&lt;level&gt;_LT</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GE', id298906 ); return false;">BOOST_&lt;level&gt;_GE</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_LE"></a>BOOST_WARN_LE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_LE"></a>BOOST_CHECK_LE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_LE"></a>BOOST_REQUIRE_LE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left &lt;= right ).
     The difference is that the argument values are reported as well.
    </p>
<div class="example">
<a name=".example55"></a><p class="title"><b>Example48.BOOST_&lt;level&gt;_LE usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 9;
    int j = 6;
    BOOST_CHECK_LE( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example55.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id661651" onclick="toggle_element( 'example55-output', 'id661651', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example55-output">&gt;example
Running 1 test case...
test.cpp(10): error in "test": check i &lt;= j failed [9 &gt; 6]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LT', id298906 ); return false;">BOOST_&lt;level&gt;_LT</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GE', id298906 ); return false;">BOOST_&lt;level&gt;_GE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GT', id298906 ); return false;">BOOST_&lt;level&gt;_GT</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LT">
<pre class="inline-synopsis">
<a name="BOOST_WARN_LT"></a>BOOST_WARN_LT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_LT"></a>BOOST_CHECK_LT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_LT"></a>BOOST_REQUIRE_LT(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left &lt; right ).
     The difference is that the argument values are reported as well.
    </p>
<div class="example">
<a name=".example56"></a><p class="title"><b>Example49.BOOST_&lt;level&gt;_LT usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 7;
    int j = 7;
    BOOST_CHECK_LT( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example56.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id661827" onclick="toggle_element( 'example56-output', 'id661827', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example56-output">&gt;example
Running 1 test case...
test.cpp(10): error in "test": check i &lt; j failed [7 &gt;= 7]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_LE', id298906 ); return false;">BOOST_&lt;level&gt;_LE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GE', id298906 ); return false;">BOOST_&lt;level&gt;_GE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_GT', id298906 ); return false;">BOOST_&lt;level&gt;_GT</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_MESSAGE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_MESSAGE"></a>BOOST_WARN_MESSAGE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>message</em></span>)
<a name="BOOST_CHECK_MESSAGE"></a>BOOST_CHECK_MESSAGE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>message</em></span>)
<a name="BOOST_REQUIRE_MESSAGE"></a>BOOST_REQUIRE_MESSAGE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>message</em></span>)</pre>
<p class="first-line-indented">
     These tools perform exactly the same check as <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a> tools. The only difference is that 
     instead of generating an error/confirm message these use the supplied one.
    </p>
<p>
     The first parameter is the boolean expression. The second parameter is the message reported in case of check 
     failure. The message argument can be constructed of components of any type supporting the 
     <code class="computeroutput">std::ostream&amp; operator&lt;&lt;(std::ostream&amp;)</code>.
    </p>
<div class="example">
<a name=".example38"></a><p class="title"><b>Example50.BOOST_&lt;level&gt;_MESSAGE usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

#include &lt;cmath&gt;

BOOST_AUTO_TEST_CASE( test )
{
    double res = std::sin( 45. );

    BOOST_WARN_MESSAGE( res &gt; 1, "sin(45){" &lt;&lt; res &lt;&lt; "} is &lt;= 1. Hmm.. Strange. " );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example38.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662020" onclick="toggle_element( 'example38-output', 'id662020', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example38-output">&gt; example --log_level=warning
Running 1 test case...
test.cpp(12): warning in "test": sin(45){0.850904} is &lt;= 1. Hmm.. Strange. 

*** No errors detected</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_NE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_NE"></a>BOOST_WARN_NE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_CHECK_NE"></a>BOOST_CHECK_NE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)
<a name="BOOST_REQUIRE_NE"></a>BOOST_REQUIRE_NE(<span class="emphasis"><em>left</em></span>, <span class="emphasis"><em>right</em></span>)</pre>
<p class="first-line-indented">
     Check performed by these tools is the same as the one performed by <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>( left != right ).
     The difference is that the matched values are reported as well.
    </p>
<div class="example">
<a name=".example54"></a><p class="title"><b>Example51.BOOST_&lt;level&gt;_NE usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    int i = 3;
    int j = 3;
    BOOST_CHECK_NE( i, j );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example54.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662185" onclick="toggle_element( 'example54-output', 'id662185', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example54-output">&gt;example
Running 1 test case...
test.cpp(10): error in "test": check i != j failed [3 == 3]

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_EQUAL', id298906 ); return false;">BOOST_&lt;level&gt;_EQUAL</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_NO_THROW">
<pre class="inline-synopsis">
<a name="BOOST_WARN_NO_THROW"></a>BOOST_WARN_NO_THROW(<span class="emphasis"><em>expression</em></span>)
<a name="BOOST_CHECK_NO_THROW"></a>BOOST_CHECK_NO_THROW(<span class="emphasis"><em>expression</em></span>)
<a name="BOOST_REQUIRE_NO_THROW"></a>BOOST_REQUIRE_NO_THROW(<span class="emphasis"><em>expression</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to perform a "no throw" check. Tools execute the supplied expression and validate that it does
     not throw any exceptions. Error would be reported by the framework even if the statement appear directly in test
     case body and throw any exception. But these tools allow proceeding further with test case in case of failure.
    </p>
<p>
     If check is successful, tools may produce a confirmation message, in other case they produce an error message in 
     a form "error in &lt;test case name&gt;exception was thrown by &lt;expression&gt;.
    </p>
<p>
     The only parameter is an expression to execute. You can use do-while(0) block if you want to execute more than one
     statement.
    </p>
<div class="example">
<a name=".example39"></a><p class="title"><b>Example52.BOOST_&lt;level&gt;_NO_THROW usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

class my_exception{};

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_CHECK_NO_THROW( throw my_exception() );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example39.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662354" onclick="toggle_element( 'example39-output', 'id662354', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example39-output">&gt; example
Running 1 test case...
test.cpp(10): error in "test": exception thrown by throw my_exception()

*** 1 failure detected in test suite "example"</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_THROW', id298906 ); return false;">BOOST_&lt;level&gt;_THROW</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_PREDICATE">
<pre class="inline-synopsis">
<a name="BOOST_WARN_PREDICATE"></a>BOOST_WARN_PREDICATE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>arguments_list</em></span>)
<a name="BOOST_CHECK_PREDICATE"></a>BOOST_CHECK_PREDICATE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>arguments_list</em></span>)
<a name="BOOST_REQUIRE_PREDICATE"></a>BOOST_REQUIRE_PREDICATE(<span class="emphasis"><em>predicate</em></span>, <span class="emphasis"><em>arguments_list</em></span>)</pre>
<p class="first-line-indented">
     These are generic tools used to validate an arbitrary supplied predicate functor (there is a compile time limit on
     predicate arity defined by the configurable macro <code class="computeroutput">BOOST_TEST_MAX_PREDICATE_ARITY</code>). To 
     validate zero arity predicate use <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a> tools. In other cases prefer theses tools. The 
     advantage of these tools is that they show arguments values in case of predicate failure.
    </p>
<p>
     The first parameter is the predicate itself. The second parameter is the list of predicate arguments each wrapped
     in round brackets (BOOST_PP sequence format).
    </p>
<div class="example">
<a name=".example40"></a><p class="title"><b>Example53.BOOST_&lt;level&gt;_PREDICATE usage</b></p>
<div class="example-contents">
<p>
      Note difference in error log from 
     </p>
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;
using namespace boost::unit_test;

//____________________________________________________________________________//

bool moo( int arg1, int arg2, int mod ) { return ((arg1+arg2) % mod) == 0; }

BOOST_AUTO_TEST_CASE( test )
{
    int i = 17;
    int j = 15;
    unit_test_log.set_threshold_level( log_warnings );
    BOOST_WARN( moo( 12,i,j ) );
    BOOST_WARN_PREDICATE( moo, (12)(i)(j) );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example40.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662544" onclick="toggle_element( 'example40-output', 'id662544', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example40-output">&gt; example
Running 1 test case...
test.cpp(14): warning in "test": condition moo( 12,i,j ) is not satisfied
test.cpp(15): warning in "test": condition moo( 12, i, j ) is not satisfied for ( 12, 17, 15 )

*** No errors detected</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_SMALL">
<pre class="inline-synopsis">
<a name="BOOST_WARN_SMALL"></a>BOOST_WARN_SMALL(<span class="emphasis"><em>value</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_CHECK_SMALL"></a>BOOST_CHECK_SMALL(<span class="emphasis"><em>value</em></span>, <span class="emphasis"><em>tolerance</em></span>)
<a name="BOOST_REQUIRE_SMALL"></a>BOOST_REQUIRE_SMALL(<span class="emphasis"><em>value</em></span>, <span class="emphasis"><em>tolerance</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to check that supplied value is small enough. The "smallness" is defined by absolute value
     of the tolerance supplied as a second argument. Use these tools with caution. To compare to values on closeness 
     it's preferable to use <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a> tools instead. 
    </p>
<p class="first-line-indented">
     The first parameter is the value to check. The second parameter is the tolerance.
    </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
      Note that to use these tools you need to include additional header floating_point_comparison.hpp. 
     </p></td></tr>
</table></div>
<div class="example">
<a name=".example41"></a><p class="title"><b>Example54.BOOST_&lt;level&gt;_SMALL usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;
#include &lt;boost/test/floating_point_comparison.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    double v = -1.23456e-3;

    BOOST_CHECK_SMALL( v, 0.000001 );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example41.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662730" onclick="toggle_element( 'example41-output', 'id662730', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example41-output">&gt; example
Running 1 test case...
test.cpp(11): error in "test": absolute value of v{-0.00123456} exceeds 1e-006

*** 1 failure detected in test suite "example"
</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE</a>, <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;_CLOSE_FRACTION', id298906 ); return false;">BOOST_&lt;level&gt;_CLOSE_FRACTION</a>,
     <a class="link" href="floating_point_comparison.html" title="Floating-point comparison algorithms">Floating point comparison algorithms</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_&lt;level&gt;_THROW">
<pre class="inline-synopsis">
<a name="BOOST_WARN_THROW"></a>BOOST_WARN_THROW(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>)
<a name="BOOST_CHECK_THROW"></a>BOOST_CHECK_THROW(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>)
<a name="BOOST_REQUIRE_THROW"></a>BOOST_REQUIRE_THROW(<span class="emphasis"><em>expression</em></span>, <span class="emphasis"><em>exception</em></span>)</pre>
<p class="first-line-indented">
     These tools are used to perform an exception detection check. Tools execute the supplied expression and validate 
     that it throws an exception of supplied class (or the one derived from it) or it's child. If the statement 
     throws any other unrelated exception or doesn't throw at all, check fails.
    </p>
<p>
     If check is successful, the tool produces a confirmation message, in other case it produces an error message in a
     form "error in <em class="replaceable"><code>test case name</code></em>: exception <em class="replaceable"><code>exception</code></em> expected.
    </p>
<p class="first-line-indented">
     The first parameter is the expression to execute. Use do-while(0) block if you want to execute more than one 
     statement. The second parameter is an expected exception.
    </p>
<div class="example">
<a name=".example45"></a><p class="title"><b>Example55.BOOST_&lt;level&gt;_THROW usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

class my_exception{};

BOOST_AUTO_TEST_CASE( test )
{
    int i =  0;
    BOOST_CHECK_THROW( i++, my_exception );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example45.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id662935" onclick="toggle_element( 'example45-output', 'id662935', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example45-output">&gt; example
Running 1 test case...
test.cpp(11): error in "test": exception my_exception is expected

*** 1 failure detected in test suite "example"</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;NO_THROW', id298906 ); return false;">BOOST_&lt;level&gt;NO_THROW</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_ERROR">
<pre class="inline-synopsis">
<a name="BOOST_ERROR"></a>BOOST_ERROR(<span class="emphasis"><em>message</em></span>)</pre>
<p class="first-line-indented">
     BOOST_ERROR tool behave the same way as <code class="computeroutput">BOOST_CHECK_MESSAGE( false, message )</code>. This tool is used for
     an unconditional error counter increasing and message logging. 
    </p>
<p>
     The only tool's parameter is an error message to log.
    </p>
<div class="example">
<a name=".example46"></a><p class="title"><b>Example56.BOOST_ERROR usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_ERROR( "Nothing to test" );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example46.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id663071" onclick="toggle_element( 'example46-output', 'id663071', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example46-output">&gt; example
Running 1 test case...
test.cpp(8): error in "test": Nothing to test

*** 1 failure detected in test suite "example"</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_FAIL">
<pre class="inline-synopsis">
<a name="BOOST_FAIL"></a>BOOST_FAIL(<span class="emphasis"><em>message</em></span>)</pre>
<p class="first-line-indented">
     BOOST_FAIL behave the same way as <code class="computeroutput">BOOST_REQUIRE_MESSAGE( false, message )</code>. This tool is used for an
     unconditional error counter increasing, message logging and the current test case aborting. 
    </p>
<p>
     The only tool's parameter is an error message to log.
    </p>
<div class="example">
<a name=".example47"></a><p class="title"><b>Example57.BOOST_FAIL usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_FAIL( "Test is not ready yet" );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example47.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id663209" onclick="toggle_element( 'example47-output', 'id663209', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example47-output">&gt; example
Running 1 test case...
test.cpp(8): fatal error in "test": Test is not ready yet

*** 1 failure detected in test suite "example"</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>
    </div>
<div class="entry" id="utf.testing-tools.reference.body.BOOST_IS_DEFINED">
<pre class="inline-synopsis">
<a name="BOOST_IS_DEFINED"></a>BOOST_IS_DEFINED(<span class="emphasis"><em>symbol</em></span>)</pre>
<p class="first-line-indented">
     Unlike the rest of the tools in the toolbox this tool does not perform the logging itself. Its only purpose
     is to check at runtime whether or not the supplied preprocessor symbol is defined. Use it in combination with
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a> to perform and log validation. Macros of any arity could be checked. To check the
     macro definition with non-zero arity specify dummy arguments for it. See below for example.
    </p>
<p>
     The only tool's parameter is a preprocessor symbol that gets validated.
    </p>
<div class="example">
<a name=".example48"></a><p class="title"><b>Example58.BOOST_IS_DEFINED usage</b></p>
<div class="example-contents">
<pre class="programlisting">#define BOOST_TEST_MODULE example
#include &lt;boost/test/included/unit_test.hpp&gt;

//____________________________________________________________________________//

BOOST_AUTO_TEST_CASE( test )
{
    BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL1) );
    BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL2(arg)) );
}

//____________________________________________________________________________//
</pre>
<table class="simplelist" border="0" summary="Simple list"><tr>
<td><code class="literal"><a href="../../../src/examples/example48.cpp" target="_top">Source code</a></code></td>
<td> | </td>
<td><code class="literal"><a href="#" target="_top" id="id663347" onclick="toggle_element( 'example48-output', 'id663347', 'Show output', 'Hide output' ); return false;">Show output</a></code></td>
</tr></table>
<pre class="example-output" id="example48-output">&gt; example
Running 1 test case...
test.cpp(8): error in "test": check ::boost::test_tools::tt_detail::is_defined_impl( "SYMBOL1", "= SYMBOL1" ) failed
test.cpp(9): error in "test": check ::boost::test_tools::tt_detail::is_defined_impl( "SYMBOL2(arg)", "= SYMBOL2(arg)" ) failed

*** 2 failures detected in test suite "example"</pre>
</div>
</div>
<br class="example-break"><span class="inline-ref-see-also">See also: </span>
     <a href="#" onclick="id298906 = select_form_page( 'utf.testing-tools.reference.body.BOOST_&lt;level&gt;', id298906 ); return false;">BOOST_&lt;level&gt;</a>
    </div>
</td>
</tr></table>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright  2001-2007 Gennadiy Rozental</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="floating_point_comparison.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing-tools.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../usage-recommendations.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>