Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / serialization / test / Jamfile.v2
1 # Boost serialization Library test Jamfile
2
3 #  (C) Copyright Robert Ramey 2002-2004.
4 #  Use, modification, and distribution are subject to the 
5 #  Boost Software License, Version 1.0. (See accompanying file 
6 #  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #
8
9 project libs/serialization/test
10     : id serialization_test
11     : requirements <library>/boost/filesystem
12     ;
13
14 # import rules for testing conditional on config file variables
15 import ../../config/checks/config : requires ;
16
17 # import rules from the boost serialization test
18 import ../util/test :
19     run-template
20     run-invoke
21     run-winvoke
22     test-bsl-run-no-lib
23     test-bsl-run
24     test-bsl-run_archive
25     test-bsl-run_files
26     test-bsl-run_polymorphic_files
27 ;
28
29 BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
30     
31 lib dll_a
32     : 
33         dll_a.cpp
34         ../build//boost_serialization
35     :
36         <link>shared
37     ;
38
39 lib dll_polymorphic_base
40     :
41         dll_polymorphic_base.cpp 
42         ../build//boost_serialization
43     :
44         <link>shared
45     ;
46
47 lib dll_polymorphic_derived2
48     :
49         dll_polymorphic_derived2.cpp
50         dll_polymorphic_base
51         ../build//boost_serialization
52     :
53         <link>shared
54     ;
55
56 test-suite "serialization" :
57      [ test-bsl-run_files test_array : A : :  [ requires cxx11_hdr_array ] ] # BOOST_NO_CXX11_HDR_ARRAY
58      [ test-bsl-run_files test_boost_array : A ]
59      [ test-bsl-run_files test_native_array : A ]
60      [ test-bsl-run_files test_binary ]
61      [ test-bsl-run_files test_class_info_save ]
62      [ test-bsl-run_files test_class_info_load ]
63      [ test-bsl-run_files test_bitset ]
64      [ test-bsl-run_files test_complex ]
65      [ test-bsl-run_files test_contained_class : A ]
66      [ test-bsl-run_files test_cyclic_ptrs : A ]
67      [ test-bsl-run_files test_delete_pointer ]
68      [ test-bsl-run_files test_deque : A ]
69      [ test-bsl-run_files test_derived ]
70      [ test-bsl-run_files test_derived_class : A ]
71      [ test-bsl-run_files test_derived_class_ptr : A ]
72      [ test-bsl-run_files test_diamond ]
73      [ test-bsl-run_files test_diamond_complex ]
74      [ test-bsl-run_files test_forward_list : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
75      [ test-bsl-run_files test_forward_list_ptrs : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
76      [ test-bsl-run_files test_helper_support ]
77      [ test-bsl-run_files test_interrupts ]
78      [ test-bsl-run_files test_list : A ]
79      [ test-bsl-run_files test_list_ptrs : A ]
80      [ test-bsl-run_files test_map : A ]
81      [ test-bsl-run_files test_map_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
82      [ test-bsl-run_files test_map_unordered : A : :  [ requires cxx11_hdr_unordered_map ] ] # BOOST_NO_CXX11_HDR_UNORDERED_MAP
83      [ test-bsl-run_files test_map_boost_unordered : A ]
84      [ test-bsl-run_files test_mi ]
85      [ test-bsl-run_files test_multiple_ptrs : A ]
86      [ test-bsl-run_files test_multiple_inheritance ]
87      [ test-bsl-run_files test_non_intrusive ]
88      [ test-bsl-run_files test_non_default_ctor ]
89      [ test-bsl-run_files test_non_default_ctor2 ]
90      [ test-bsl-run_files test_null_ptr ]
91      [ test-bsl-run_files test_nvp : A ]
92      [ test-bsl-run_files test_object ]
93      [ test-bsl-run_files test_primitive ]
94      [ test-bsl-run_files test_priority_queue : A ]
95      [ test-bsl-run_files test_queue : A ]
96      [ test-bsl-run_files test_recursion : A ]
97      [ test-bsl-run_files test_registered ]
98      [ test-bsl-run_files test_set : A ]
99      [ test-bsl-run_files test_set_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
100      [ test-bsl-run_files test_set_unordered : A : :  [ requires cxx11_hdr_unordered_set ] ] # BOOST_NO_CXX11_HDR_UNORDERED_SET
101      [ test-bsl-run_files test_set_boost_unordered : A ]
102      [ test-bsl-run_files test_simple_class : A ]
103      [ test-bsl-run_files test_simple_class_ptr : A ]
104      [ test-bsl-run_files test_slist : A : : [ requires slist ] ] # BOOST_HAS_SLIST ]
105      [ test-bsl-run_files test_slist_ptrs : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] ]
106      [ test-bsl-run_files test_split ]
107      [ test-bsl-run_files test_stack : A ]
108      [ test-bsl-run_files test_tracking ]
109      [ test-bsl-run_files test_unregistered ]
110      [ test-bsl-run_files test_unique_ptr ]
111      [ test-bsl-run_files test_valarray ]
112      [ test-bsl-run_files test_variant : A ]
113      [ test-bsl-run_files test_vector : A ]
114      [ test-bsl-run_files test_new_operator : A ]
115      [ test-bsl-run_files test_optional ]
116      [ test-bsl-run_files test_shared_ptr ]
117      [ test-bsl-run_files test_shared_ptr_multi_base ]
118      [ test-bsl-run_files test_shared_ptr_132 : : : [ requires auto_ptr  ] ] # BOOST_NO_AUTO_PTR
119
120      [ test-bsl-run_polymorphic_files test_polymorphic : test_polymorphic_A A ]
121      [ test-bsl-run_polymorphic_files test_polymorphic2 : test_polymorphic2imp ]
122      [ test-bsl-run_polymorphic_files test_p_helper ]
123
124      # this test should pass with both shared and static linking.  But B2 get's mixed up with static linking
125      # so we'll just run the shared version of the test, which is the one that we're most interested
126      # in anyway.
127      [ test-bsl-run_polymorphic_files test_dll_exported : polymorphic_derived1 :  dll_polymorphic_base dll_polymorphic_derived2  : <link>static:<build>no ]
128
129      [ test-bsl-run_polymorphic_files test_no_rtti : polymorphic_base polymorphic_derived1 polymorphic_derived2 ]
130      [ test-bsl-run_polymorphic_files test_exported : polymorphic_base polymorphic_derived1 polymorphic_derived2 ]
131
132      # should compile
133      [ compile test_strong_typedef.cpp ]
134     ;
135
136 if ! $(BOOST_ARCHIVE_LIST) {
137     test-suite "serialization2" : 
138         [ test-bsl-run test_inclusion ]
139         [ test-bsl-run test_inclusion2 ]
140         # boost build has the feature that the building if libraries vs dll is automatic
141         # in that dependent libraries are built the same way - shared/static - that
142         # the application is.  On some platforms (e.g windows) this is required to avoid
143         # problems of linking incompatible versions of the runtime library.  So
144         # we suppress tests of our dlls when using static libraries
145
146         [ test-bsl-run test_dll_simple   : : dll_a :  <link>static:<build>no ]
147         # [ test-bsl-run test_dll_plugin : : dll_derived2 : <link>static:<build>no <target-os>linux:<linkflags>-ldl ]
148
149         [ test-bsl-run test_private_ctor ]
150         [ test-bsl-run test_reset_object_address : A ]
151         [ test-bsl-run test_void_cast ]
152         [ test-bsl-run test_mult_archive_types ]
153         [ test-bsl-run test_iterators ]
154         [ test-bsl-run test_iterators_base64 ]
155         [ test-bsl-run test_smart_cast ]
156         [ test-bsl-run test_codecvt_null ]
157         [ test-bsl-run test_singleton ]
158         [ test-bsl-run test_singleton_inherited ]
159         [ test-bsl-run test_singleton_plain ]
160
161         # [ test-bsl-run test_z ]
162
163         # should fail compilation
164         [ compile-fail test_not_serializable.cpp ]
165         [ compile-fail test_traits_fail.cpp ]
166         [ compile-fail test_const_load_fail1.cpp ]
167         [ compile-fail test_const_load_fail2.cpp ]
168         [ compile-fail test_const_load_fail3.cpp ]
169         [ compile-fail test_const_load_fail1_nvp.cpp ]
170         [ compile-fail test_const_load_fail2_nvp.cpp ]
171         [ compile-fail test_const_load_fail3_nvp.cpp ]
172         [ compile-fail test_check.cpp ]
173
174         # should compile with a warning message
175         [ compile test_static_warning.cpp ]
176         [ compile test_const_save_warn1.cpp ]
177         [ compile test_const_save_warn2.cpp ]
178         [ compile test_const_save_warn3.cpp ]
179
180         # note - library unable to detect these errors for now
181         #[ compile test_const_save_warn1_nvp.cpp ]
182         #[ compile test_const_save_warn2_nvp.cpp ]
183         #[ compile test_const_save_warn3_nvp.cpp ]
184         
185         # should compile
186         [ compile test_traits_pass.cpp ]
187         [ compile test_const_pass.cpp ]
188     ;
189 }
190