• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9project libs/serialization/test
10    : id serialization_test
11    : requirements <library>/boost/filesystem
12    ;
13
14# import rules for testing conditional on config file variables
15import ../../config/checks/config : requires ;
16
17# import rules from the boost serialization test
18import ../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
29BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
30
31lib dll_a
32    :
33        dll_a.cpp
34        ../build//boost_serialization
35    :
36        <link>shared
37    ;
38
39lib dll_polymorphic_base
40    :
41        dll_polymorphic_base.cpp
42        ../build//boost_serialization
43    :
44        <link>shared
45    ;
46
47lib dll_polymorphic_derived2
48    :
49        dll_polymorphic_derived2.cpp
50        dll_polymorphic_base
51        ../build//boost_serialization
52    :
53        <link>shared
54    ;
55
56test-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_new_operator : A ]
88     [ test-bsl-run_files test_optional ]
89     [ test-bsl-run_files test_non_intrusive ]
90     [ test-bsl-run_files test_non_default_ctor ]
91     [ test-bsl-run_files test_non_default_ctor2 ]
92     [ test-bsl-run_files test_null_ptr ]
93     [ test-bsl-run_files test_nvp : A ]
94     [ test-bsl-run_files test_object ]
95     [ test-bsl-run_files test_primitive ]
96     [ test-bsl-run_files test_priority_queue : A ]
97     [ test-bsl-run_files test_queue : A ]
98     [ test-bsl-run_files test_recursion : A ]
99     [ test-bsl-run_files test_registered ]
100     [ test-bsl-run_files test_set : A ]
101     [ test-bsl-run_files test_set_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
102     [ test-bsl-run_files test_set_unordered : A : :  [ requires cxx11_hdr_unordered_set ] ] # BOOST_NO_CXX11_HDR_UNORDERED_SET
103     [ test-bsl-run_files test_set_boost_unordered : A ]
104     [ test-bsl-run_files test_simple_class : A ]
105     [ test-bsl-run_files test_simple_class_ptr : A ]
106     [ test-bsl-run_files test_slist : A : : [ requires slist ] ] # BOOST_HAS_SLIST ]
107     [ test-bsl-run_files test_slist_ptrs : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] ]
108     [ test-bsl-run_files test_split ]
109     [ test-bsl-run_files test_stack : A ]
110     [ test-bsl-run_files test_tracking ]
111     [ test-bsl-run_files test_unregistered ]
112     [ test-bsl-run_files test_unique_ptr ]
113     [ test-bsl-run_files test_valarray ]
114     [ test-bsl-run_files test_variant : A ]
115     [ test-bsl-run_files test_vector : A ]
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
136if ! $(BOOST_ARCHIVE_LIST) {
137    test-suite "serialization2" :
138        [ test-bsl-run test_inclusion ]
139        [ test-bsl-run test_inclusion2 ]
140
141        # boost build has the feature that the building if libraries vs dll is automatic
142        # in that dependent libraries are built the same way - shared/static - that
143        # the application is.  On some platforms (e.g windows) this is required to avoid
144        # problems of linking incompatible versions of the runtime library.  So
145        # we suppress tests of our dlls when using static libraries
146
147        [ test-bsl-run test_dll_simple   : : dll_a :  <link>static:<build>no ]
148        # [ test-bsl-run test_dll_plugin : : dll_derived2 : <link>static:<build>no <target-os>linux:<linkflags>-ldl ]
149
150        [ test-bsl-run test_private_ctor ]
151        [ test-bsl-run test_reset_object_address : A ]
152        [ test-bsl-run test_void_cast ]
153        [ test-bsl-run test_mult_archive_types ]
154        [ test-bsl-run test_iterators ]
155        [ test-bsl-run test_iterators_base64 ]
156        [ test-bsl-run test_smart_cast ]
157        [ test-bsl-run test_codecvt_null ]
158        [ test-bsl-run test_singleton ]
159        [ test-bsl-run test_singleton_inherited ]
160        [ test-bsl-run test_singleton_plain ]
161
162        # [ test-bsl-run test_z ]
163
164        # should fail compilation
165        [ compile-fail test_not_serializable.cpp ]
166        [ compile-fail test_traits_fail.cpp ]
167        [ compile-fail test_const_load_fail1.cpp ]
168        [ compile-fail test_const_load_fail2.cpp ]
169        [ compile-fail test_const_load_fail3.cpp ]
170        [ compile-fail test_const_load_fail1_nvp.cpp ]
171        [ compile-fail test_const_load_fail2_nvp.cpp ]
172        [ compile-fail test_const_load_fail3_nvp.cpp ]
173        [ compile-fail test_check.cpp ]
174
175        # should compile with a warning message
176        [ compile test_static_warning.cpp ]
177        [ compile test_const_save_warn1.cpp ]
178        [ compile test_const_save_warn2.cpp ]
179        [ compile test_const_save_warn3.cpp ]
180
181        # note - library unable to detect these errors for now
182        #[ compile test_const_save_warn1_nvp.cpp ]
183        #[ compile test_const_save_warn2_nvp.cpp ]
184        #[ compile test_const_save_warn3_nvp.cpp ]
185
186        # should compile
187        [ compile test_traits_pass.cpp ]
188        [ compile test_const_pass.cpp ]
189    ;
190}
191
192