Skip to content

Commit 2b4d02e

Browse files
author
roman_yakovenko
committed
add new test cases
1 parent 504536e commit 2b4d02e

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

unittests/data/vector_traits.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Copyright 2004 Roman Yakovenko.
2-
// Distributed under the Boost Software License, Version 1.0. (See
3-
// accompanying file LICENSE_1_0.txt or copy at
4-
// http://www.boost.org/LICENSE_1_0.txt)
1+
// Copyright 2004 Roman Yakovenko.
2+
// Distributed under the Boost Software License, Version 1.0. (See
3+
// accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
55

6-
#include <string>
6+
#include <string>
77
#include <vector>
88

99

@@ -65,4 +65,6 @@ namespace no{
6565
};
6666
}
6767

68-
}
68+
}
69+
70+
void do_nothing( std::vector< std::wstring >& );

unittests/vector_traits_tester.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def test_declaration( self ):
5959
cnt = 'std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >@::std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >'
6060
traits = declarations.find_container_traits( cnt )
6161
self.failUnless( declarations.vector_traits is traits)
62+
63+
def test_element_type( self ):
64+
do_nothing = self.global_ns.free_fun( 'do_nothing' )
65+
v = declarations.remove_reference( declarations.remove_declarated( do_nothing.arguments[0].type ))
66+
declarations.vector_traits.element_type( v )
6267

6368
def create_suite():
6469
suite = unittest.TestSuite()

0 commit comments

Comments
 (0)