Imported Upstream version 1.64.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 <source>/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 : test-bsl-run-no-lib ;
19 import ../util/test :
20     run-template
21     run-invoke
22     run-winvoke
23     test-bsl-run-no-lib
24     test-bsl-run
25     test-bsl-run_archive
26     test-bsl-run_files
27     test-bsl-run_polymorphic_archive
28 ;
29
30 BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
31
32 lib dll_a_lib 
33     : 
34         dll_a.cpp
35         ../build//boost_serialization
36     : 
37     ;
38
39 lib dll_base_lib 
40     : 
41         dll_base.cpp
42         ../build//boost_serialization
43     : 
44     ;
45     
46 lib dll_derived2_lib
47     :
48         dll_derived2.cpp 
49         dll_base_lib
50         ../build//boost_serialization
51     : 
52     ;
53
54 lib dll_polymorphic_derived2_lib
55     :
56         polymorphic_derived2.cpp 
57         ../build//boost_serialization
58     : 
59     ;
60
61 test-suite "serialization" :
62      [ test-bsl-run_files test_array : A : :  [ requires cxx11_hdr_array ] ] # BOOST_NO_CXX11_HDR_ARRAY
63      [ test-bsl-run_files test_boost_array : A ]
64      [ test-bsl-run_files test_native_array : A ]
65      [ test-bsl-run_files test_binary ]
66      [ test-bsl-run_files test_class_info_save ]
67      [ test-bsl-run_files test_class_info_load ]
68      [ test-bsl-run_files test_bitset ]
69      [ test-bsl-run_files test_complex ]
70      [ test-bsl-run_files test_contained_class : A ]
71      [ test-bsl-run_files test_cyclic_ptrs : A ]
72      [ test-bsl-run_files test_delete_pointer ]
73      [ test-bsl-run_files test_deque : A ]
74      [ test-bsl-run_files test_derived ]
75      [ test-bsl-run_files test_derived_class : A ]
76      [ test-bsl-run_files test_derived_class_ptr : A ]
77      [ test-bsl-run_files test_diamond ]
78      [ test-bsl-run_files test_diamond_complex ]
79      [ test-bsl-run_files test_exported : polymorphic_base ]
80      [ test-bsl-run_files test_forward_list : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
81      [ test-bsl-run_files test_forward_list_ptrs : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
82      [ test-bsl-run_files test_helper_support ]
83      [ test-bsl-run_files test_interrupts ]
84      [ test-bsl-run_files test_list : A ]
85      [ test-bsl-run_files test_list_ptrs : A ]
86      [ test-bsl-run_files test_map : A ]
87      [ test-bsl-run_files test_map_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
88      [ test-bsl-run_files test_map_unordered : A : :  [ requires cxx11_hdr_unordered_map ] ] # BOOST_NO_CXX11_HDR_UNORDERED_MAP
89      [ test-bsl-run_files test_map_boost_unordered : A ]
90      [ test-bsl-run_files test_mi ]
91      [ test-bsl-run_files test_multiple_ptrs : A ]
92      [ test-bsl-run_files test_multiple_inheritance ]
93      [ test-bsl-run_files test_no_rtti : polymorphic_base polymorphic_derived1 ]
94      [ test-bsl-run_files test_non_intrusive ]
95      [ test-bsl-run_files test_non_default_ctor ]
96      [ test-bsl-run_files test_non_default_ctor2 ]
97      [ test-bsl-run_files test_null_ptr ]
98      [ test-bsl-run_files test_nvp : A ]
99      [ test-bsl-run_files test_object ]
100      [ test-bsl-run_files test_primitive ]
101      [ test-bsl-run_files test_priority_queue : A ]
102      [ test-bsl-run_files test_queue : A ]
103      [ test-bsl-run_files test_recursion : A ]
104      [ test-bsl-run_files test_registered ]
105      [ test-bsl-run_files test_set : A ]
106      [ test-bsl-run_files test_set_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
107      [ test-bsl-run_files test_set_unordered : A : :  [ requires cxx11_hdr_unordered_set ] ] # BOOST_NO_CXX11_HDR_UNORDERED_SET
108      [ test-bsl-run_files test_set_boost_unordered : A ]
109      [ test-bsl-run_files test_simple_class : A ]
110      [ test-bsl-run_files test_simple_class_ptr : A ]
111      [ test-bsl-run_files test_slist : A : : [ requires slist ] ] # BOOST_HAS_SLIST ]
112      [ test-bsl-run_files test_slist_ptrs : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] ]
113      [ test-bsl-run_files test_split ]
114      [ test-bsl-run_files test_stack : A ]
115      [ test-bsl-run_files test_tracking ]
116      [ test-bsl-run_files test_unregistered ]
117      [ test-bsl-run_files test_unique_ptr ]
118      [ test-bsl-run_files test_valarray ]
119      [ test-bsl-run_files test_variant : A ]
120      [ test-bsl-run_files test_vector : A ]
121      [ test-bsl-run_files test_new_operator : A ]
122      [ test-bsl-run_files test_optional ]
123      [ test-bsl-run_files test_shared_ptr ]
124      [ test-bsl-run_files test_shared_ptr_multi_base ]
125      [ test-bsl-run_files test_shared_ptr_132 ]
126      [ test-bsl-run_polymorphic_archive test_polymorphic : test_polymorphic_A A ]
127      [ test-bsl-run_polymorphic_archive test_polymorphic2 : test_polymorphic2imp ]
128      [ test-bsl-run_polymorphic_archive test_polymorphic_helper ]
129
130      # should compile
131      [ compile test_strong_typedef.cpp ]
132     ;
133
134 if ! $(BOOST_ARCHIVE_LIST) {
135     test-suite "serialization2" : 
136         [ test-bsl-run-no-lib test_inclusion ]
137         [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib ]
138         [ test-bsl-run test_dll_simple : : dll_a_lib ]
139         [ compile test_dll_plugin.cpp ]
140         # Running the following test requires that the test know the directory 
141         # in which the dll is stored. I don't know how to extract this from bjam
142         # [ test-bsl-run test_dll_plugin : : dll_polymorphic_derived2_lib ]
143         [ test-bsl-run test_private_ctor ]
144         [ test-bsl-run test_reset_object_address : A ]
145         [ test-bsl-run test_void_cast ]
146         [ test-bsl-run test_mult_archive_types ]
147         [ test-bsl-run test_iterators ]
148         [ test-bsl-run test_iterators_base64 ]
149         [ test-bsl-run test_smart_cast ]
150         [ test-bsl-run test_codecvt_null 
151             : ../src/codecvt_null
152             :
153             : [ requires std_wstreambuf ]
154         ]
155         
156         #[ test-bsl-run test_z ]
157
158         # should fail compilation
159         [ compile-fail test_not_serializable.cpp ]
160         [ compile-fail test_traits_fail.cpp ]
161         [ compile-fail test_const_load_fail1.cpp ]
162         [ compile-fail test_const_load_fail2.cpp ]
163         [ compile-fail test_const_load_fail3.cpp ]
164         [ compile-fail test_const_load_fail1_nvp.cpp ]
165         [ compile-fail test_const_load_fail2_nvp.cpp ]
166         [ compile-fail test_const_load_fail3_nvp.cpp ]
167         [ compile-fail test_check.cpp ]
168
169         # should compile with a warning message
170         [ compile test_static_warning.cpp ]
171         [ compile test_const_save_warn1.cpp ]
172         [ compile test_const_save_warn2.cpp ]
173         [ compile test_const_save_warn3.cpp ]
174         # note - library unable to detect these errors for now
175         #[ compile test_const_save_warn1_nvp.cpp ]
176         #[ compile test_const_save_warn2_nvp.cpp ]
177         #[ compile test_const_save_warn3_nvp.cpp ]
178         
179         # should compile
180         [ compile test_traits_pass.cpp ]
181         [ compile test_const_pass.cpp ]
182     ;
183 }